Skip to content

feat(webkit): allow running WebKit via WSL on Windows #36358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mxschmitt
Copy link
Member

No description provided.

@mxschmitt mxschmitt force-pushed the webkit-via-wsl-experiment branch from 10a64dd to 34667d2 Compare June 19, 2025 12:30
Copy link
Contributor

Test results for "tests 1"

2 fatal errors, not part of any test
18 failed
❌ [webkit-library] › library/beforeunload.spec.ts:20:3 › should close browser with beforeunload page @webkit-wsl-headed
❌ [webkit-library] › library/beforeunload.spec.ts:30:3 › should close browsercontext with beforeunload page @webkit-wsl-headed
❌ [webkit-library] › library/beforeunload.spec.ts:38:3 › should be able to navigate away from page with beforeunload @webkit-wsl-headed
❌ [webkit-library] › library/beforeunload.spec.ts:46:3 › should close page with beforeunload listener @webkit-wsl-headed
❌ [webkit-library] › library/beforeunload.spec.ts:55:3 › should run beforeunload if asked for @smoke @webkit-wsl-headed
❌ [webkit-library] › library/beforeunload.spec.ts:79:3 › should access page after beforeunload @webkit-wsl-headed
❌ [webkit-library] › library/beforeunload.spec.ts:92:3 › should not stall on evaluate when dismissing beforeunload @webkit-wsl-headed
❌ [webkit-library] › library/beforeunload.spec.ts:107:3 › should not stall on click when dismissing beforeunload @webkit-wsl-headed
❌ [webkit-library] › library/browser.spec.ts:20:5 › should return browserType @webkit-wsl-headed
❌ [webkit-library] › library/browser.spec.ts:24:5 › should create new page @smoke @webkit-wsl-headed
❌ [webkit-library] › library/browser.spec.ts:38:5 › should throw upon second create new page @webkit-wsl-headed
❌ [webkit-library] › library/browser.spec.ts:46:5 › version should work @webkit-wsl-headed
❌ [webkit-library] › library/browser.spec.ts:54:5 › should dispatch page.on(close) upon browser.close and reject evaluate @webkit-wsl-headed
❌ [webkit-library] › library/browsercontext-add-cookies.spec.ts:22:3 › should work @smoke @webkit-wsl-headed
❌ [webkit-library] › library/browsercontext-add-cookies.spec.ts:32:3 › should work with expires=-1 @webkit-wsl-headed
❌ [webkit-library] › library/browsercontext-add-cookies.spec.ts:50:3 › should add cookies with empty value @webkit-wsl-headed
❌ [webkit-library] › library/browsercontext-add-cookies.spec.ts:68:3 › should set cookies with SameSite attribute and no secure attribute @webkit-wsl-headed
❌ [webkit-library] › library/browsercontext-add-init-script.spec.ts:20:3 › should work with browser context scripts @smoke @webkit-wsl-headed

0 passed, 4091 did not run
✔️✔️✔️

Merge workflow run.

Copy link
Contributor

@agg23 agg23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very clean. I like it.

socket.on('error', reject);
});

const [executable, ...args] = process.argv.slice(2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though this is run by us, this should have proper error handling.

env: {
...this.amendEnvironment(env, userDataDir, executable, browserArguments, options.channel),
"WSLENV": "SOCKET_ADDRESS",
'SOCKET_ADDRESS': (transportServer?.address() as any)?.port?.toString() ?? '',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is our goal here if we don't have a transport?

override amendEnvironment(env: Env, userDataDir: string, executable: string, browserArguments: string[], channel?: string): Env {
return {
...env,
// CURL_COOKIE_JAR_PATH: path.join(channel === 'webkit-wsl' ? translatePathToWSL(userDataDir) : userDataDir, 'cookiejar.db'),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if condition.

@mxschmitt mxschmitt force-pushed the webkit-via-wsl-experiment branch from 62bd7f5 to e8c3971 Compare July 2, 2025 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants