Skip to content

test(websocket): cover setExtraHTTPHeaders and locale on the handshake request - #42037

Merged
dcrousso merged 1 commit into
microsoft:mainfrom
dcrousso:fix-WebSocket-setExtraHTTPHeaders
Aug 4, 2026
Merged

test(websocket): cover setExtraHTTPHeaders and locale on the handshake request#42037
dcrousso merged 1 commit into
microsoft:mainfrom
dcrousso:fix-WebSocket-setExtraHTTPHeaders

Conversation

@dcrousso

@dcrousso dcrousso commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Network.setExtraHTTPHeaders and an emulated locale now reach the WebSocket handshake request, but nothing exercised either from the page or from inside a Worker

Chromium:

WebKit:

Chrome Stable and Edge Stable are both still on 150, which predates that Chromium work, so widen the existing guard to browserMajorVersion < 151 and reuse it on the new cases

Firefox drops the browsing context association when it opens the handshake channel, so the Worker cases stay it.fixme there until the bundled Firefox picks up https://phabricator.services.mozilla.com/D310690

fixes #13919
fixes #28948

@dcrousso
dcrousso requested a review from yury-s July 29, 2026 18:00
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

…shake request

`Network.setExtraHTTPHeaders` and an emulated `locale` now reach the `WebSocket` handshake request, but nothing exercised either from the page or from inside a `Worker`

Chromium:
- <https://chromium-review.googlesource.com/c/chromium/src/+/7950740> (Network.setExtraHTTPHeaders should affect WebSocket handshake requests)
- <https://chromium-review.googlesource.com/c/chromium/src/+/8000530> (Network.setExtraHTTPHeaders should affect WebSocket requests in a Worker)

WebKit:
- <WebKit/WebKit#67097> (Web Inspector: Network.setExtraHTTPHeaders does not affect WebSocket)

Chrome Stable and Edge Stable are both still on 150, which predates that Chromium work, so widen the existing guard to `browserMajorVersion < 151` and reuse it on the new cases

Firefox drops the browsing context association when it opens the handshake channel, so the `Worker` cases stay `it.fixme` there until the bundled Firefox picks up <https://phabricator.services.mozilla.com/D310690>
@dcrousso
dcrousso force-pushed the fix-WebSocket-setExtraHTTPHeaders branch from 4bb031a to 7c2ffa0 Compare August 4, 2026 20:59
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/cli-core.spec.ts:140 › uncheck @mcp-windows-latest-firefox

8049 passed, 1284 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🟢 CI is clear — the one failure is a pre-existing Firefox-on-Windows flake

Hi, I'm the Playwright bot and I took a first look at the CI failures here.

The single failure — [firefox] › mcp/cli-core.spec.ts:140 › uncheck on mcp-windows-latest-firefox — isn't caused by this PR. This is a test-only change to web-socket.spec.ts and browsercontext-locale.spec.ts; it doesn't touch the MCP CLI or the checkbox snapshot path this test exercises. And the same test has already failed on mcp-windows-latest-firefox on a main push, where this PR can't be responsible. Green.

Details

Overall: 1 failed, 8049 passed, 1284 skipped. The one failure is a known Firefox/Windows flake; nothing here looks caused by the PR.

Pre-existing flake / infra

  • [firefox] › mcp/cli-core.spec.ts:140 › uncheck (mcp-windows-latest-firefox) — the failure is a checkbox accessibility-state race: Expected substring: "- checkbox [active]" / Received string: "- checkbox [checked]", i.e. the snapshot was taken before the state settled. In the aggregated results DB this test failed on mcp-windows-latest-firefox on run 30585190799 — a push to main (sha 30d5b2ec), which predates and is independent of this branch. On that same bot it's 2 failures across 381 runs, and it's 0 failures everywhere else: ~633 runs each on ubuntu chrome/chromium/webkit, ~620–631 on macOS, and 0 on mcp-windows-latest-{chromium,chrome,webkit,msedge}. The diff is test-only (web-socket.spec.ts, browsercontext-locale.spec.ts) and doesn't reach cli-core.spec.ts or any MCP code, so there's no path from the change to this failure.

Triaged by the Playwright bot - agent run

@dcrousso
dcrousso merged commit 2be6315 into microsoft:main Aug 4, 2026
73 of 77 checks passed
@dcrousso
dcrousso deleted the fix-WebSocket-setExtraHTTPHeaders branch August 4, 2026 21:54
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

1 failed
❌ [playwright-test] › playwright.artifacts.spec.ts:127 › should work with screenshot: on @ubuntu-latest-node26

3 flaky ⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/browsercontext-reuse.spec.ts:361 › reuse launch › should work with routeWebSocket `@chromium-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/heap.spec.ts:223 › should not leak workers `@firefox-ubuntu-22.04-node20`

51217 passed, 1190 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🟢 CI is clear — the one failure is a pre-existing cross-PR flake

Hi, I'm the Playwright bot and I took another look at the CI failures here.

The single failure — [playwright-test] › playwright.artifacts.spec.ts:127 › should work with screenshot: on on ubuntu-latest-node26 — isn't caused by this PR. This is a test-only change to web-socket.spec.ts and browsercontext-locale.spec.ts; it doesn't touch the test runner or the artifact-collection path this test asserts on. And the same test has now failed on two unrelated PRs where this branch can't be responsible, so it's a flake. Green.

Details

Overall: 1 failed, 51217 passed, 1190 skipped, plus 3 within-run flakies a retry rescued. This PR changes no product code — only test files web-socket.spec.ts and browsercontext-locale.spec.ts — so there's no path from the diff to the playwright-test runner behaviour this test exercises.

Pre-existing flake / infra

  • [playwright-test] › playwright.artifacts.spec.ts:127 › should work with screenshot: on (ubuntu-latest-node26) — the test-finished-1.png artifact for artifacts-shared-shared-passing was missing from the collected list (Received +0), a timing-sensitive artifact check. In the aggregated results DB this test is 3 failures across 891 runs, and the other two are on unrelated PRs on different bots: test(firefox): fixme flaky "should create userDataDir" on macOS #41811 (ubuntu-latest-node20, sha ff0e7693, 2026-07-16) and Revert "chore: roll stable test runner to 1.62.0-beta-1784842988000" #42003 (macos-latest-node22, sha a44e5142, 2026-07-27). It flips verdict across runs on SHAs this branch can't have caused, which is what makes it a flake rather than a regression. My earlier note called this uncertain because the DB snapshot hadn't yet ingested those other-PR failures; with the refreshed data the cross-PR history is now clear.

Triaged by the Playwright bot

Triaged by the Playwright bot - agent run

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

Labels

None yet

Projects

None yet

2 participants