Skip to content

Commit 71c82af

Browse files
authored
Merge pull request #97 from freshtechbro/codex/release-0.0.37-ci-cookie-fix
test: make Chrome cookie bootstrap test hermetic
2 parents bdfc1db + 47191bf commit 71c82af

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/browser/system-chrome-cookies.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ async function firstExistingPath(paths: readonly string[]): Promise<string | nul
297297
}
298298

299299
export async function loadSystemChromeCookies(
300-
executablePath?: string | null
300+
executablePath?: string | null,
301+
platform = process.platform
301302
): Promise<SystemChromeCookieBootstrapResult> {
302303
const source = discoverSystemChromeProfileSource();
303304
if (!source) {
@@ -308,7 +309,7 @@ export async function loadSystemChromeCookies(
308309
};
309310
}
310311

311-
const direct = await loadSystemChromeCookiesFromSqlite(source);
312+
const direct = await loadSystemChromeCookiesFromSqlite(source, platform);
312313
if (direct.cookies.length > 0) {
313314
return {
314315
cookies: direct.cookies,

tests/system-chrome-cookies.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ describe("loadSystemChromeCookies", () => {
411411
});
412412

413413
const { loadSystemChromeCookies } = await import("../src/browser/system-chrome-cookies");
414-
const result = await loadSystemChromeCookies("/bin/chrome");
414+
const result = await loadSystemChromeCookies("/bin/chrome", "darwin");
415415

416416
expect(result.cookies).toEqual([{
417417
name: "direct_public_cookie",

0 commit comments

Comments
 (0)