Skip to content

Commit ba2acea

Browse files
committed
Fixes
1 parent 5c9792a commit ba2acea

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

packages/playwright-core/src/server/browserType.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export abstract class BrowserType extends SdkObject {
211211
command: prepared.executable,
212212
args: prepared.browserArguments,
213213
env: {
214-
...await this.amendEnvironment(env, prepared.userDataDir, isPersistent),
214+
...await this.amendEnvironment(env, options, prepared.userDataDir, isPersistent),
215215
...await processLifecycleHooks?.envProvider(),
216216
},
217217
handleSIGINT,
@@ -337,7 +337,7 @@ export abstract class BrowserType extends SdkObject {
337337

338338
abstract defaultArgs(options: types.LaunchOptions, isPersistent: boolean, userDataDir: string): Promise<string[]>;
339339
abstract connectToTransport(transport: ConnectionTransport, options: BrowserOptions, browserLogsCollector: RecentLogsCollector): Promise<Browser>;
340-
abstract amendEnvironment(env: Env, userDataDir: string, isPersistent: boolean): Promise<Env>;
340+
abstract amendEnvironment(env: Env, options: types.LaunchOptions, userDataDir: string, isPersistent: boolean): Promise<Env>;
341341
abstract doRewriteStartupLog(error: ProtocolError): ProtocolError;
342342
abstract attemptToGracefullyCloseBrowser(transport: ConnectionTransport): void;
343343
protected processLifecycleHooks(options: types.LaunchOptions): LaunchLifecycleHooks | undefined {

packages/playwright-core/src/server/webkit/webkit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ export class WebKit extends BrowserType {
4242
return WKBrowser.connect(this.attribution.playwright, transport, options);
4343
}
4444

45-
override async amendEnvironment(env: Env, userDataDir: string, isPersistent: boolean): Promise<Env> {
45+
override async amendEnvironment(env: Env, options: types.LaunchOptions, userDataDir: string, isPersistent: boolean): Promise<Env> {
4646
return {
4747
...env,
48-
CURL_COOKIE_JAR_PATH: process.platform === 'win32' && isPersistent ? await translatePathToWSL(path.join(userDataDir, 'cookiejar.db')) : undefined,
48+
CURL_COOKIE_JAR_PATH: process.platform === 'win32' && isPersistent && options.channel !== 'webkit-wsl' ? path.join(userDataDir, 'cookiejar.db') : undefined,
4949
};
5050
}
5151

tests/library/trace-viewer.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,8 @@ test('should remove noscript when javaScriptEnabled is set to true', async ({ br
14561456
await expect(frame.getByText('Enable JavaScript to run this app.')).toBeHidden();
14571457
});
14581458

1459-
test('should open snapshot in new browser context', async ({ browser, page, runAndTrace, server }) => {
1459+
test('should open snapshot in new browser context', async ({ browser, page, runAndTrace, server, channel }) => {
1460+
test.skip(channel === 'webkit-wsl');
14601461
const traceViewer = await runAndTrace(async () => {
14611462
await page.goto(server.EMPTY_PAGE);
14621463
await page.setContent('hello');

tests/page/page-goto.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ it('should work with file URL with subframes', async ({ page, asset, isAndroid,
4646
expect(page.frames().length).toBe(3);
4747
});
4848

49-
it('should use http for no protocol', async ({ page, server, isAndroid }) => {
49+
it('should use http for no protocol', async ({ page, server, isAndroid, channel }) => {
5050
it.skip(isAndroid);
51+
it.skip(channel === 'webkit-wsl');
5152

5253
await page.goto(server.EMPTY_PAGE.substring('http://'.length));
5354
expect(page.url()).toBe(server.EMPTY_PAGE);

0 commit comments

Comments
 (0)