#34871·cypress

Spike: investigate navigation and page-load gaps for `experimentalWebKitSupport`

Author: AtofStrykerCreated Sep 17, 2026Updated Sep 17, 2026
Labelsbrowser: webkitexperiment: webkit

Summary

Child of #34870.

About 39 driver tests and 5 system tests for navigation and page load are skipped on WebKit. We don't know why any of them fail. Most of the driver skips were added together in #23232 (Aug 2022) to make the new WebKit CI job pass. Nobody recorded a root cause.

These specs have not run on WebKit in our CI since January 2025. #30770 changed the WebKit driver job to a narrow specPattern that leaves them out. So the first step is to run them and see what still fails.

Related: #34869 owns cy.origin(), cross-origin navigation, and the missing reload:aut:frame / navigate:aut:history automation handlers. #24600 (flaky navigation) was closed by the stale bot in 2023. It was never fixed.

What's skipped

Driver (not run on WebKit in CI):

  • packages/driver/cypress/e2e/commands/navigation.cy.js:1911 — the #page load context, 4 tests. These check the driver's page-load machinery: the __cypress.initial cookie is set during beforeunload and cleared after load; command timeouts reset on beforeunload; the page load log goes from pending to passed; pageLoadTimeout errors fire. The cookie part overlaps the cookies spike. Find out early whether this is a cookie failure or a lifecycle failure.
  • navigation.cy.js:2312 — the #url:changed context, 15 tests. These check navigation:changed events for page navigation, hashchange, pushState, and replaceState. One test (#19230) walks history.back() and forward() and asserts the exact event order. The detection code is in packages/driver/src/cy/commands/navigation.ts:63 and listeners.ts. None of it is browser-specific.
  • packages/driver/cypress/e2e/issues/1244.cy.js:25 — 12 tests. A <form> submit and an <a> click, each trying to escape the AUT frame with target=_top. The comment says only 4 of the 12 fail on WebKit. Nobody wrote down which four.
  • packages/driver/cypress/e2e/issues/base_target.cy.ts:5 — 7 tests for <base target> stripping. The gate was added in #33667. Neither the commit nor the PR mentions WebKit. The implementation is not browser-specific. The gate was probably copied from 1244.cy.js. Run the file. If it passes, delete the gate.
  • packages/driver/cypress/e2e/cy/timers.cy.js:416 — 1 test. A timer queued before location.reload() must not fire. Same for a timer queued across cy.reload().

System tests (do run on WebKit in CI):

  • system-tests/test/form_submissions_spec.js:150,160webkit is 404ing on redirects after the form submit on the default clientRoute /__/. Only skip in the row with a stated symptom; points at the server, not the driver.
  • system-tests/test/visit_spec.js:135 (visit.cy.js: anchors, huge DOM, TLSv1, UA propagation, POST redirect codes) and :228 (source_rewriting.cy.js: obstructive code, #3975 relative redirects).
  • system-tests/test/web_security_spec.js:76 (cross-origin navigation error surface) and :102 (chromeWebSecurity warning, pinned to firefox — may be a product decision whether WebKit emits it).

User-reported, no test coverage — confirm on current playwright-webkit, then fix, file, or close:

  • #27394 .dev TLD in baseUrl → blank page
  • #25840 page.goto: An SSL error has occurred against HTTPS baseUrl through the proxy
  • #26847 read ECONNRESET in Docker against /etc/hosts names
  • #24896 specs hang in parallel CI (32 comments, open since 2022)

One hypothesis worth testing first

The driver listens for unload on the AUT window in every browser (packages/driver/src/cy/listeners.ts:97). Two other places switch to pagehide, but only for Chromium: cross-origin/events/spec_window.ts:8 and app/src/runner/event-manager.ts:357. WebKit's back/forward cache can suppress unload. If it does that for AUT navigations, it would explain both the #page load and #url:changed failures at once. This is unverified.

Method

cd packages/driver && yarn cypress:run --browser webkit --spec cypress/e2e/commands/navigation.cy.js,cypress/e2e/issues/1244.cy.js,cypress/e2e/issues/base_target.cy.ts,cypress/e2e/cy/timers.cy.js
yarn test-system -- --browser webkit visit_spec.js form_submissions_spec.js web_security_spec.js

Run as-is, then with the guards removed on a PoC branch. Run failures more than once to separate deterministic from flake.

Non-goals

  • Fixing anything.
  • cy.origin(), the spec bridge, the two missing automation handlers — #34869.
  • The FIXME: fix flaky test (webkit) tests (#34870 flaky row), unless a root cause here explains them.
  • page_loading_spec.js:81 — cookies spike.
  • Changing the WebKit driver job's spec pattern — its own PR.

Deliverables

  • Pass/fail inventory for all 39 + 5 tests with guards removed.
  • Which 4 of 12 in 1244.cy.js fail; yes/no on whether base_target.cy.ts ever needed its gate.
  • Root-cause grouping: how many distinct bugs.
  • Repro status for #27394, #25840, #26847, #24896.
  • Follow-up issues per gap; call on #24600 (reopen or supersede).

Timebox

TBD after the first run.