[wpt-sync] Sync PR 62189 - Fix microtask race in src-repeated-in-ancestor.html test
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox156 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 62189 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62189
Details from upstream follow.
Dominic Farolino <dom@chromium.org> wrote:
Fix microtask race in src-repeated-in-ancestor.html test
The test previously used:
Promise.race([ subjectNavigation.then(...), controlNavigation] );... to detect if an iframe associated with
subjectNavigationnavigated
to a URL that matches an ancestor URL. In Chromium, when beforeunload
fired synchronously in both iframes, wrapping subjectNavigation in a
.then()created a pending promise whose microtask ran after
controlNavigationhad already settled.This caused Promise.race to resolve with controlNavigation first,
accidentally masking any navigation/beforeunload events on the subject
iframe, which is used to assert that a navigation didn't take place in
that iframe at all.This CL replaces the
Promise.race()race with an explicit check
ensuring no beforeunload event was dispatched on the subject iframe by
the time the control iframe finishes loading. Chromium fails the fixed
test which reveals that we never implemented step 3 of
https://html.spec.whatwg.org/C#shared-attribute-processing-steps-for-iframe-and-frame-elements in the HTML Standard:If the inclusive ancestor navigables of element's node navigable contains a navigable whose active document's URL equals url with exclude fragments set to true, then return null.This was found during investigation in
https://github.com/whatwg/html/issues/12800.R=nrosenthal
Bug: N/A
Change-Id: I03c205aef55db2daf1cfa6fde8ef0df7d08a79acReviewed-on: https://chromium-review.googlesource.com/8281045
WPT-Export-Revision: ce194cc26e77b3653e63b3f70b8c9d9600ee63a8
| Assignee | ||
Updated•3 months ago
|
| Assignee | ||
Comment 1•3 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=16ba8234a0cb1022fe7e6bbe24c881ef7cb23aa8
| Assignee | ||
Comment 2•3 months ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 163 tests
Status Summary
Firefox
OK : 1[GitHub] 148[Gecko-windows11-64-25h2-debug] 149[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-opt]
PASS: 1[GitHub] 8[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 215[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 218[Gecko-windows11-64-25h2-debug] 219[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-64-25h2-opt]
FAIL: 3[GitHub] 13[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
PASS: 1
FAIL: 3
Safari
OK : 1
PASS: 1
FAIL: 3
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub.html [wpt.fyi]:
SKIP - /html/semantics/embedded-content/the-iframe-element/iframe-allow.html [wpt.fyi]
- iframe-cross-origin-allow:
FAIL
- iframe-cross-origin-allow:
- /html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-history-pushState.html [wpt.fyi]
- History state change for iframe loading='lazy' before it is loaded: history.pushState:
FAIL
- History state change for iframe loading='lazy' before it is loaded: history.pushState:
- /html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.html [wpt.fyi]
- In-viewport loading=lazy iframe does not block the load event:
FAIL - In-viewport loading=lazy visibility:hidden iframe does not block the load event:
FAIL
- In-viewport loading=lazy iframe does not block the load event:
- /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_anchor_download_block_downloads.tentative.html [wpt.fyi]
- <a download> triggered download in sandbox is blocked before a request is made.:
FAIL
- <a download> triggered download in sandbox is blocked before a request is made.:
- /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html [wpt.fyi]
- Check that sandboxed iframe can not navigate their ancestors:
FAIL
- Check that sandboxed iframe can not navigate their ancestors:
- /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html [wpt.fyi]
- Check that sandboxed iframe can not navigate their ancestors:
FAIL
- Check that sandboxed iframe can not navigate their ancestors:
- /html/semantics/embedded-content/the-iframe-element/same-origin-contextual-fragment.html [wpt.fyi]
*
HTML5 Sandbox: an iframe with same-origin and no allow-scripts does not
run scripts from a contextual fragment.
:FAIL - /html/semantics/embedded-content/the-iframe-element/sandbox-inherit-to-blank-document-unsandboxed.html [wpt.fyi]
- The initial empty document inherit sandbox via CSP.:
FAIL - The synchronous re-navigation to about:blank inherits sandbox via CSP:
FAIL
- The initial empty document inherit sandbox via CSP.:
- /html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-delivered-both.tentative.sub.window.html [wpt.fyi]:
OK[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-opt],SKIP[Gecko-windows11-64-25h2-debug] - /html/semantics/embedded-content/the-iframe-element/src-repeated-in-ancestor.html [wpt.fyi]
- same path name, no document fragment:
FAIL(Chrome:FAIL, Safari:FAIL) - same path name, different document fragment:
FAIL(Chrome:FAIL, Safari:FAIL) - same path name, no document fragement (intermediary browsing context):
FAIL(Chrome:FAIL, Safari:FAIL)
- same path name, no document fragment:
- /html/semantics/embedded-content/the-iframe-element/iframe-initially-empty-is-updated.html [wpt.fyi]:
SKIP
Tests Disabled in Gecko Infrastructure
- /html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub.html [wpt.fyi]:
SKIPlinked bug:Bug 1653034 - /html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-delivered-both.tentative.sub.window.html [wpt.fyi]:
OK[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-opt],SKIP[Gecko-windows11-64-25h2-debug] - /html/semantics/embedded-content/the-iframe-element/iframe-initially-empty-is-updated.html [wpt.fyi]:
SKIP
Comment 4•3 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/d5dcc945d1eb
https://hg.mozilla.org/mozilla-central/rev/93bb0416e78b
Description
•