Skip to content

fix(webview): send Target.setPauseOnStart earlier#41413

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

fix(webview): send Target.setPauseOnStart earlier#41413
dcrousso merged 1 commit into
microsoft:mainfrom
dcrousso:fix-WKWebView-setPauseOnStart

Conversation

@dcrousso

Copy link
Copy Markdown
Contributor

upstream WebKit is able to send this as soon as Web Inspector is opened since that only happens when there is for sure something to inspect

as such, Web Inspector doesn't have to wait to receive a message in order to know that there is a target to receive this command

leverage Target.targetCreated as the likely first event from the inspected page to emulate this behavior

@dcrousso dcrousso requested review from pavelfeldman and yury-s June 22, 2026 18:00
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@dcrousso dcrousso added the CQ1 label Jun 22, 2026
@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"

4 failed
❌ [firefox-page] › page/workers.spec.ts:40 › should emit created and destroyed events @tracing-firefox
❌ [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

24 flaky ⚠️ [chromium-library] › library/chromium/chromium.spec.ts:177 › serviceWorker(), and fromServiceWorker() work `@tracing-chromium`
⚠️ [chromium-page] › page/page-request-continue.spec.ts:756 › propagate headers cross origin redirect after interception `@tracing-chromium`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@msedge-dev-windows-latest`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@chrome-ubuntu-22.04`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:299 › should report intercepted service worker requests in HAR `@msedge-windows-latest`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@msedge-windows-latest`
⚠️ [chromium-page] › page/page-keyboard.spec.ts:202 › should press plus `@msedge-windows-latest`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:117 › launchServer › should print HTTP error `@chromium-macos-15-large`
⚠️ [chromium-library] › library/global-fetch-cookie.spec.ts:277 › should override cookie from Set-Cookie header even if it expired `@chromium-macos-15-large`
⚠️ [chromium-library] › library/heap.spec.ts:203 › cycle handles `@chromium-macos-15-large`
⚠️ [chromium-library] › library/chromium/oopif.spec.ts:150 › should take screenshot `@chromium-macos-15-xlarge`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@chrome-windows-latest`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@chrome-beta-ubuntu-22.04`
⚠️ [chromium-page] › page/page-request-continue.spec.ts:756 › propagate headers cross origin redirect after interception `@chrome-beta-ubuntu-22.04`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:141 › launchServer › should be able to reconnect to a browser `@chrome-macos-latest`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:177 › serviceWorker(), and fromServiceWorker() work `@chrome-macos-latest`
⚠️ [chromium-library] › library/video.spec.ts:456 › screencast › should be 800x600 with null viewport `@chrome-macos-latest`
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:43 › should poll on interval `@tracing-firefox`
⚠️ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:180 › should have passed URL when launching with ignoreDefaultArgs: true `@firefox-macos-15-large`
⚠️ [firefox-library] › library/logger.spec.ts:34 › should log context-level `@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/browsercontext-base-url.spec.ts:37 › should construct a new URL when a baseURL in browserType.launchPersistentContext is passed to page.goto `@tracing-webkit`
⚠️ [webkit-library] › library/browsertype-connect.spec.ts:792 › launchServer › should upload a folder `@webkit-macos-15-large`
⚠️ [webkit-page] › page/page-request-continue.spec.ts:194 › post data › should compute content-length from post data `@webkit-macos-15-large`

104519 passed, 4403 skipped


Merge workflow run.

upstream WebKit is able to send this as soon as Web Inspector is opened since that only happens when there is for sure something to inspect

as such, Web Inspector doesn't have to wait to receive a message in order to know that there is a target to receive this command

leverage `Target.targetCreated` as the likely first event from the inspected page to emulate this behavior
@dcrousso dcrousso force-pushed the fix-WKWebView-setPauseOnStart branch from 5a886c9 to 4e8b6e6 Compare June 22, 2026 22:41
@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 116d33b into microsoft:main Jun 22, 2026
47 of 50 checks passed
@dcrousso dcrousso deleted the fix-WKWebView-setPauseOnStart branch June 22, 2026 23:14
@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

5 flaky ⚠️ [chromium-library] › library/video.spec.ts:645 › screencast › should capture full viewport `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:717 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:680 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node24`
⚠️ [playwright-test] › ui-mode-test-update.spec.ts:202 › should update test locations `@ubuntu-latest-node22`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:189 › should show snapshots for steps `@windows-latest-node22`

48924 passed, 1142 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

7380 passed, 1122 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