Skip to content

feat(webkit): run webview tests against WebKitGTK/WPE over remote inspector#41151

Draft
yury-s wants to merge 5 commits into
microsoft:mainfrom
yury-s:feat-webkitgtk-webview
Draft

feat(webkit): run webview tests against WebKitGTK/WPE over remote inspector#41151
yury-s wants to merge 5 commits into
microsoft:mainfrom
yury-s:feat-webkitgtk-webview

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented Jun 4, 2026

Summary

  • Adds a Linux path for the webview tests that drives a WebKitGTK/WPE browser (Epiphany, MiniBrowser, …) through its remote inspector HTTP server, alongside the existing iOS Simulator path.
  • connectOverCDP's listTabs now falls back from the iOS /json listing to parsing WebKitGTK's HTML target page (/socket/<connectionID>/<targetID>/WebPage); the per-page protocol is identical, so the rest is unchanged.
  • The webview fixture auto-launches a configurable browser (PW_WEBVIEW_BROWSER / PW_WEBVIEW_BROWSER_ARGS, default system MiniBrowser) with WEBKIT_INSPECTOR_HTTP_SERVER, and disables the WebKit sandbox so it runs regardless of the host's user-namespace policy.
  • Adds the tests_webview_gtk.yml CI workflow (ubuntu-24.04, MiniBrowser under xvfb), scoped to a curated subset for now, and seeds webkit-webview-gtk-page.txt expectations from the iOS baseline.

Draft: other PR workflows are temporarily disabled in this branch while the GTK bot baseline is established. Revert the relevant commit before merge.

yury-s added 5 commits June 4, 2026 15:21
…pector

Adds a Linux path for the webview tests that drives a WebKitGTK/WPE browser
(Epiphany, MiniBrowser, ...) through its remote inspector HTTP server, alongside
the existing iOS Simulator path.

WebKitGTK/WPE expose targets differently from ios_webkit_debug_proxy: with
WEBKIT_INSPECTOR_HTTP_SERVER set, the target list is an HTML page at `/` and each
target's `/socket/<connectionID>/<targetID>/<type>` path upgrades to a WebSocket
speaking the same Target-wrapped protocol as the iOS tabs. listTabs now falls
back from the `/json` listing to parsing that page, so connectOverCDP works
against either transport unchanged.

The webview fixture auto-launches a configurable browser (PW_WEBVIEW_BROWSER /
PW_WEBVIEW_BROWSER_ARGS, defaulting to the system MiniBrowser) on Linux and adds
a webkit-webview-gtk-page project.
WebKit's bubblewrap sandbox needs an unprivileged user namespace, which Ubuntu
24.04 denies to unconfined processes (kernel.apparmor_restrict_unprivileged_userns=1),
so the spawned MiniBrowser/Epiphany crashes with "setting up uid map: Permission
denied". The browser is a throwaway test target, so pass
WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1 to run regardless of host policy.

Also adds tests/webview/run-epiphany.sh helper.
Adds tests_webview_gtk.yml, which runs the webview tests on ubuntu-24.04 against
the WebKitGTK MiniBrowser (from libwebkitgtk-6.0-4) under xvfb + dbus, sharded 4x.

Temporarily neutralizes the pull_request trigger on the other workflows that would
otherwise run on this PR (infra, components, MCP, tests 1, iOS webview simulator)
by pointing them at a non-existent path, so only the new workflow runs while it is
being iterated on. Revert this commit to restore them.
Both transports hit the same WebKit remote inspector limitations, so start the
WebKitGTK skip list from webkit-webview-page.txt. Refine from a CI run: drop
entries that pass on WebKitGTK and add GTK-specific failures.
Run only page-check, page-click, page-goto and page-keyboard for now while the
GTK baseline is established; widen to the full config later.
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.

1 participant