[wpt-sync] Sync PR 38836 - Ensure we never fire a navigateerror event without a navigate event
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox113 fixed)
Tracking | Status | |
---|---|---|
firefox113 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 38836 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/38836
Details from upstream follow.
Nate Chapin <japhet@chromium.org> wrote:
Ensure we never fire a navigateerror event without a navigate event
- Currently, we try to error any upcoming traversals on frame detach,
rather than leaving the promises unfulfilled. That's inconsistent
with what we do for an ongoing navigation. Leave them unfulfilled,
and move the cleanup logic to ContextDestroyed(), where the
cleanup for the ongoing navigation case is.- Now the only place we error an upcoming traversals is
TraverseCancelled(). Directly reject the promise and remove the
traversal from upcoming_traversals_, rather than going through
RejectPromisesAndFireNavigateErrorEvent(). This fixes the issue
where we would fire a navigateerror event for a traversal that
had not yet fired a navigate event.- Now RejectPromisesAndFireNavigateErrorEvent() and
FinalizeWithAbortedNavigationError() are now only used for the
ongoing navigation, so there's no need for them to take a
NavigationApiNaviagtion* parameter.- Every codepath that ends a navigation now knows whether it is an
ongoing navigation or an upcoming traversal. Clear the
appropriate state directly rather than needing
CleanupApiNavigation().Bug: 1421647
Change-Id: I959b9f7b47e962c41aa57a49dcbf0e4bfce9a15e
Reviewed-on: https://chromium-review.googlesource.com/4313039
WPT-Export-Revision: bc3a6864038842dbafbaf3b4170140893fe0688b
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 5 tests and 1 subtests
Status Summary
Firefox
OK
: 5
FAIL
: 5
Chrome
OK
: 5
PASS
: 2
FAIL
: 3
Safari
OK
: 5
FAIL
: 5
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /navigation-api/navigate-event/navigation-traverseTo-in-iframe-same-document-preventDefault.html [wpt.fyi]
- navigation.traverseTo() in an iframe with same-document preventDefault in its parent:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- navigation.traverseTo() in an iframe with same-document preventDefault in its parent:
- /navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document-before-navigate-event.html [wpt.fyi]
- traverseTo() promise rejections when detaching an iframe before onnavigate (cross-document):
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- traverseTo() promise rejections when detaching an iframe before onnavigate (cross-document):
- /navigation-api/navigation-methods/return-value/traverseTo-detach-same-document-before-navigate-event.html [wpt.fyi]
- traverseTo() promise rejections when detaching an iframe before onnavigate (same-document):
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- traverseTo() promise rejections when detaching an iframe before onnavigate (same-document):
- /navigation-api/navigation-methods/sandboxing-back-parent.html [wpt.fyi]
- A sandboxed iframe cannot navigate its parent via its own navigation object by using back():
FAIL
(Chrome:PASS
, Safari:FAIL
)
- A sandboxed iframe cannot navigate its parent via its own navigation object by using back():
- /navigation-api/navigation-methods/sandboxing-back-sibling.html [wpt.fyi]
- A sandboxed iframe cannot navigate its sibling via its own navigation object by using back():
FAIL
(Chrome:PASS
, Safari:FAIL
)
- A sandboxed iframe cannot navigate its sibling via its own navigation object by using back():
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b921f9c29e8a
https://hg.mozilla.org/mozilla-central/rev/359a63b55a31
Description
•