Skip to content

fix(webview): adjust UserAgent test to work with mobile#41415

Merged
dcrousso merged 1 commit into
microsoft:mainfrom
dcrousso:fix-WKWebView-setUserAgent-2
Jun 22, 2026
Merged

fix(webview): adjust UserAgent test to work with mobile#41415
dcrousso merged 1 commit into
microsoft:mainfrom
dcrousso:fix-WKWebView-setUserAgent-2

Conversation

@dcrousso

Copy link
Copy Markdown
Contributor

iOS has the same UserAgent "prefix" as macOS, only adding Mobile/15E148 at the very end

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 2"

15 failed
❌ [chromium-page] › page/page-basic.spec.ts:125 › should have sane user agent @msedge-dev-windows-latest
❌ [chromium-page] › page/page-basic.spec.ts:125 › should have sane user agent @msedge-windows-latest
❌ [firefox-page] › page/workers.spec.ts:40 › should emit created and destroyed events @tracing-firefox
❌ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:111 › should restore state from userDataDir @firefox-macos-15-large
❌ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:139 › should create userDataDir if it does not exist @firefox-macos-15-large
❌ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:180 › should have passed URL when launching with ignoreDefaultArgs: true @firefox-macos-15-large
❌ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:202 › should handle exception @firefox-macos-15-large
❌ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:246 › should connect to a browser with the default page @firefox-macos-15-large
❌ [firefox-library] › library/heap.spec.ts:203 › cycle handles @firefox-macos-15-large
❌ [firefox-library] › library/inspector/cli-codegen-csharp.spec.ts:202 › should not print context options method override in xunit if no options were passed @firefox-macos-15-large
❌ [firefox-library] › library/inspector/cli-codegen-csharp.spec.ts:208 › should print context options method override in xunit if options were passed @firefox-macos-15-large
❌ [firefox-library] › library/proxy.spec.ts:235 › should exclude patterns @firefox-macos-15-large
❌ [firefox-page] › page/workers.spec.ts:40 › should emit created and destroyed events @firefox-macos-15-large
❌ [firefox-page] › page/workers.spec.ts:40 › should emit created and destroyed events @firefox-windows-latest
❌ [firefox-page] › page/workers.spec.ts:40 › should emit created and destroyed events @firefox-macos-15-xlarge

35 flaky ⚠️ [chromium-library] › library/har-websocket.spec.ts:239 › should attach websocket messages for a still open websocket after stopping `@tracing-chromium`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@msedge-dev-windows-latest`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:299 › should report intercepted service worker requests in HAR `@chrome-ubuntu-22.04`
⚠️ [chromium-library] › library/har-websocket.spec.ts:235 › should attach websocket messages `@chrome-ubuntu-22.04`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@chrome-ubuntu-22.04`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@msedge-windows-latest`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:189 › launchServer › should ignore page.pause when headed `@chromium-macos-15-large`
⚠️ [chromium-library] › library/heap.spec.ts:203 › cycle handles `@chromium-macos-15-large`
⚠️ [chromium-library] › library/video.spec.ts:645 › screencast › should capture full viewport `@chromium-macos-15-xlarge`
⚠️ [chromium-library] › library/video.spec.ts:717 › screencast › should work with video+trace `@chromium-macos-15-xlarge`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@chrome-windows-latest`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:299 › should report intercepted service worker requests in HAR `@chrome-beta-ubuntu-22.04`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@chrome-beta-ubuntu-22.04`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:686 › launchServer › should filter launch options `@chrome-macos-latest`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@chrome-macos-latest`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@tracing-firefox`
⚠️ [firefox-library] › library/browsertype-connect.spec.ts:267 › run-server › should send default User-Agent and X-Playwright-Browser headers with connect request `@firefox-macos-15-large`
⚠️ [firefox-library] › library/browsertype-connect.spec.ts:792 › run-server › should upload a folder `@firefox-macos-15-large`
⚠️ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:209 › should fire close event for a persistent context `@firefox-macos-15-large`
⚠️ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:253 › should support har option `@firefox-macos-15-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-csharp.spec.ts:43 › should print the correct context options for custom settings `@firefox-macos-15-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-csharp.spec.ts:202 › should not print context options method override in nunit if no options were passed `@firefox-macos-15-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-csharp.spec.ts:202 › should not print context options method override in mstest if no options were passed `@firefox-macos-15-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-java.spec.ts:125 › should print a valid basic program in junit `@firefox-macos-15-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-javascript.spec.ts:84 › should save the codegen output to a file if specified `@firefox-macos-15-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-pytest.spec.ts:49 › should save the codegen output to a file if specified `@firefox-macos-15-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-python-async.spec.ts:80 › should save the codegen output to a file if specified `@firefox-macos-15-large`
⚠️ [firefox-library] › library/logger.spec.ts:34 › should log context-level `@firefox-macos-15-large`
⚠️ [firefox-library] › library/proxy.spec.ts:125 › should allow bypassing localhost requests `@firefox-macos-15-large`
⚠️ [firefox-library] › library/proxy.spec.ts:144 › should authenticate `@firefox-macos-15-large`
⚠️ [firefox-library] › library/tracing.spec.ts:210 › should respect tracesDir and name `@firefox-macos-15-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-3.spec.ts:224 › cli codegen › should generate frame locators (4) `@firefox-windows-latest`
⚠️ [webkit-library] › library/browsertype-connect.spec.ts:792 › launchServer › should upload a folder `@webkit-macos-15-large`
⚠️ [webkit-library] › library/global-fetch.spec.ts:56 › should support global userAgent option `@webkit-macos-15-large`
⚠️ [android-page] › page/page-goto.spec.ts:451 › should disable timeout when its set to 0

104497 passed, 4403 skipped


Merge workflow run.

iOS has the same UserAgent "prefix" as macOS, only adding `Mobile/15E148` at the very end
@dcrousso dcrousso force-pushed the fix-WKWebView-setUserAgent-2 branch from 08e5312 to 632234f Compare June 22, 2026 22:40
@dcrousso

Copy link
Copy Markdown
Contributor Author

im gonna investigate the issue with tests/page/page-set-content.spec.ts:153:3 › should handle timeout properly 2 separately since i can reproduce that locally without these chanages

@dcrousso dcrousso merged commit d0c98af into microsoft:main Jun 22, 2026
47 of 50 checks passed
@dcrousso dcrousso deleted the fix-WKWebView-setUserAgent-2 branch June 22, 2026 23:15
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

7380 passed, 1122 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

3 failed
❌ [chromium-library] › library/browsercontext-add-init-script.spec.ts:28 › should work without navigation, after all bindings @chromium-ubuntu-22.04-arm-node20
❌ [chromium-library] › library/browsercontext-expose-function.spec.ts:77 › should be callable from-inside addInitScript @chromium-ubuntu-22.04-arm-node20
❌ [firefox-page] › page/workers.spec.ts:40 › should emit created and destroyed events @firefox-ubuntu-22.04-node20

2 flaky ⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/inspector/cli-codegen-3.spec.ts:224 › cli codegen › should generate frame locators (4) `@firefox-ubuntu-22.04-node20`

48927 passed, 1142 skipped


Merge workflow run.

@dcrousso

Copy link
Copy Markdown
Contributor Author

test timeout fixed in #41416

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants