[wpt-sync] Sync PR 63265 - Add WPT for prerender-until-script to prerender upgrade
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox160 fixed)
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 63265 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63265
Details from upstream follow.
Viktoria Zlatinova <vizlatin@microsoft.com> wrote:
Add WPT for prerender-until-script to prerender upgrade
Adds a Web Platform Test for the prerender-until-script host upgrading
to a full prerender host when a matching prerender speculation rule is
added for the same URL. The upgrade unpauses the previously paused
inline JavaScript on the prerendered page, which the test verifies via
document.prerendering.Flow:
- Initiator adds a
prerender_until_scriptrule; the
prerender-until-script host starts loading with inline JS paused.- The prerendered page's async \<script src> tag fetches the
"pus-loaded" signal (this fetch fires even with JS paused),
which releases the initiator's hanging long-poll fetch.- The initiator then adds a regular
prerenderrule for the same
URL, triggering the upgrade.- The previously paused inline \<script> finally runs, captures
document.prerendering, and posts it back via PrerenderChannel.- The initiator activates the prerender and the test asserts the
captured value wastrue, proving the script ran during
prerendering rather than after activation.Without the upgrade (feature disabled), the inline JS never runs and
the test fails at a 30 st.step_timeoutwith a diagnostic pointing
at the missing upgrade rather than a bare harness timeout.A new
prerender-until-script-upgradevirtual test suite enables
PrerenderUntilScriptUpgrade(browser-side, off by default) for
this test;exclusive_tests: "ALL"skips the bare non-virtual run
so the test only executes with the flag on.The wptserve signal handler's long-poll loop is bounded at 60 s
(returning 504 on timeout). This is intentionally longer than the
test's own 30 st.step_timeout, so the test's semantic diagnostic
remains the visible failure reason on a regression; the bound exists
to unblock the initiator's fetch so itsreportFailurepath can
close the popup cleanly rather than leaking a wptserve worker thread.Bug: 504686720
Change-Id: I29d7dbed53d10b3c6164c398a502adb4f3fe2525
Reviewed-on: https://chromium-review.googlesource.com/7900337
WPT-Export-Revision: 2e111e9007339f650662132e21891decffea65fa
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=100746
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 2 tests and 1 subtests
Status Summary
Firefox
ERROR: 1[GitHub] 2[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
OK : 1
FAIL : 1
Safari
ERROR: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /speculation-rules/prerender-until-script/prerender-until-script.https.html [wpt.fyi]:
ERROR - /speculation-rules/prerender-until-script/pus-to-prerender-upgrade.https.html [wpt.fyi]:
ERROR(Chrome:OK, Safari:ERROR)
Comment 4•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/06436a66ff6f
https://hg.mozilla.org/mozilla-central/rev/4d49d70e1e5a
Description
•