Skip to content

Commit

Permalink
[Navigation] Improve maintaining the entries list and their interacti…
Browse files Browse the repository at this point in the history
…on with HistoryItems

https://bugs.webkit.org/show_bug.cgi?id=273956

Reviewed by Alex Christensen.

This changes a few areas but it all adds up to solving the same problems.
I'll go over the changes by entry point:

- navigation.navigate() takes a historyHandling argument that controls the
  history behavior all the way down.
- navigation.back/forward/traverseTo load the known HistoryItem instead of
  loading a URL as well as specify the correct FrameLoadType.
- the location APIs use the proper historyHandling.
- navigation.entries() is more accurately maintained:
  - On reactivation (loading a cached page from history) we regenerate the entires.
  - On a cross-document navigation we filter out any cross-origin entries.
- history.pushState/history.replaceState changes are reflected in entries.
  - This also no longer changes the key of replaced entries.
- Traversal events use the proper HistoryItem.

This all leads to a more consistent and correct list of entries. In order for adding
these entries to work there were also a few dispatches of NavigateEvent in the
expected places like during a history traversal or history state change.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/currententrychange-event/history-back-same-doc-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/currententrychange-event/history-pushState-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/currententrychange-event/history-replaceState-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc-popup-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/currententrychange-event/navigation-navigate-replace-same-doc-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/cross-origin-traversal-does-not-fire-navigate-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/cross-window/click-samedocument-crossorigin-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/cross-window/click-samedocument-sameorigin-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/event-constructor-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/intercept-and-navigate-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/intercept-history-pushState-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/intercept-history-replaceState-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/intercept-on-synthetic-event-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/intercept-popstate-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/intercept-same-document-history-back-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-destination-after-detach-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-destination-dynamic-index-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-destination-getState-back-forward-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-history-back-after-fragment-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-history-back-after-pushState-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-history-back-noop-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-history-pushState-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-history-replaceState-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-navigation-back-same-document-in-iframe-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-window-open-self-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigation-back-cross-document-preventDefault-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigation-traverseTo-in-iframe-same-document-preventDefault-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/replaceState-inside-back-handler-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-activation/activation-same-document-then-cross-document-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/after-detach-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/current-basic-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/entries-after-bfcache-in-iframe-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/index-not-in-entries-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/key-id-back-same-document-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/key-id-location-reload-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/key-id-location-replace-cross-origin-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/key-id-location-replace-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/no-referrer-from-meta-url-censored-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/no-referrer-url-censored-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/sameDocument-after-fragment-navigate-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/sameDocument-after-navigate-restore-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/state-after-navigate-restore-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/back-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/back-intercept-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/back-intercept-rejected-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/forward-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/forward-intercept-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/forward-intercept-rejected-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/navigate-intercept-interrupted-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/navigate-interrupted-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/navigate-unload-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/reload-unload-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/traverseTo-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/traverseTo-intercept-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/traverseTo-intercept-rejected-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/traverseTo-after-adding-iframe-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/traverseTo-after-data-url-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/traverseTo-detach-between-navigate-and-navigatesuccess-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/traverseTo-with-cross-origin-in-history-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/ordering-and-transition/currententrychange-dispose-ordering-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/per-entry-events/dispose-after-bfcache-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/per-entry-events/dispose-for-navigation-in-child-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/per-entry-events/dispose-same-document-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/per-entry-events/dispose-same-document-intercept-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/per-entry-events/dispose-same-document-navigate-during-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/per-entry-events/dispose-same-document-replaceState-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/per-entry-events/dispose-skip-current-on-truncate-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/state/cross-document-away-and-back-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/state/cross-document-location-api-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/state/location-reload-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/updateCurrentEntry-method/history-pushState-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/updateCurrentEntry-method/same-document-away-and-back-location-api-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/navigation-api/navigate-event/cross-window/click-samedocument-crossorigin-sameorigindomain.sub-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/entries-after-navigations-in-multiple-windows-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/navigation-api/navigation-methods/sandboxing-navigate-parent-expected.txt:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::navigateFromServiceWorker):
* Source/WebCore/history/BackForwardController.cpp:
(WebCore::BackForwardController::allItems):
* Source/WebCore/history/BackForwardController.h:
* Source/WebCore/history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* Source/WebCore/history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
* Source/WebCore/history/HistoryItem.h:
(WebCore::HistoryItem::uuidIdentifier const):
(WebCore::HistoryItem::operator== const):
* Source/WebCore/loader/FrameLoadRequest.h:
(WebCore::FrameLoadRequest::navigationHistoryBehavior const):
(WebCore::FrameLoadRequest::setNavigationHistoryHandling):
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::determineNavigationType):
(WebCore::FrameLoader::loadInSameDocument):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
(WebCore::FrameLoader::loadItem):
(WebCore::FrameLoader::updateNavigationAPIEntries):
(WebCore::determineNavigationType): Deleted.
* Source/WebCore/loader/FrameLoader.h:
* Source/WebCore/loader/HistoryController.cpp:
(WebCore::HistoryController::pushState):
(WebCore::HistoryController::replaceState):
* Source/WebCore/loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::scheduleLocationChange):
* Source/WebCore/loader/NavigationScheduler.h:
* Source/WebCore/loader/SubframeLoader.cpp:
(WebCore::FrameLoader::SubframeLoader::loadOrRedirectSubframe):
* Source/WebCore/page/DOMWindow.h:
* Source/WebCore/page/History.cpp:
(WebCore::History::stateObjectAdded):
* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::LocalDOMWindow::setLocation):
* Source/WebCore/page/LocalDOMWindow.h:
* Source/WebCore/page/Location.cpp:
(WebCore::Location::replace):
(WebCore::Location::setLocation):
* Source/WebCore/page/Navigation.cpp:
(WebCore::getEntryIndexOfHistoryItem):
(WebCore::Navigation::initializeEntries):
(WebCore::Navigation::maybeSetUpcomingNonTraversalTracker):
(WebCore::Navigation::navigate):
(WebCore::Navigation::performTraversal):
(WebCore::Navigation::traverseTo):
(WebCore::Navigation::back):
(WebCore::Navigation::forward):
(WebCore::Navigation::updateForNavigation):
(WebCore::Navigation::updateForReactivation):
(WebCore::Navigation::promoteUpcomingAPIMethodTracker):
(WebCore::Navigation::cleanupAPIMethodTracker):
(WebCore::Navigation::innerDispatchNavigateEvent):
(WebCore::Navigation::dispatchTraversalNavigateEvent):
* Source/WebCore/page/Navigation.h:
* Source/WebCore/page/NavigationHistoryEntry.cpp:
(WebCore::NavigationHistoryEntry::NavigationHistoryEntry):
(WebCore::NavigationHistoryEntry::sameDocument const):
(WebCore::NavigationHistoryEntry::getState const):
(WebCore::NavigationHistoryEntry::setState):
* Source/WebCore/page/NavigationHistoryEntry.h:
* Source/WebCore/page/RemoteDOMWindow.cpp:
(WebCore::RemoteDOMWindow::setLocation):
* Source/WebCore/page/RemoteDOMWindow.h:

Canonical link: https://commits.webkit.org/278960@main
  • Loading branch information
TingPing committed May 18, 2024
1 parent 521e9dc commit 7e54fb8
Show file tree
Hide file tree
Showing 123 changed files with 390 additions and 285 deletions.
1 change: 0 additions & 1 deletion LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -6878,7 +6878,6 @@ imported/w3c/web-platform-tests/navigation-api/navigate-event/cross-window/ [ Sk
# These failures include UUIDs that change every run.
imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/key-id-back-same-document.html [ Failure ]
imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/key-id-location-reload.html [ Failure ]
imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/key-id-location-replace.html [ Failure ]
imported/w3c/web-platform-tests/navigation-api/navigation-methods/navigate-replace-same-document.html [ Failure ]

# Crash caused by detach.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL currententrychange fires for history.back() assert_equals: expected "traverse" but got "push"
PASS currententrychange fires for history.back()

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL currententrychange fires for history.pushState() assert_true: expected true got false
PASS currententrychange fires for history.pushState()

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL currententrychange fires for history.replaceState() assert_true: expected true got false
PASS currententrychange fires for history.replaceState()

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


PASS currententrychange does not fire when navigating away from the initial about:blank
FAIL currententrychange does not fire when navigating away from the initial about:blank assert_unreached: currententrychange should not fire Reached unreachable code

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

PASS currententrychange does not fire when navigating away from the initial about:blank (popup window)
FAIL currententrychange does not fire when navigating away from the initial about:blank (popup window) assert_unreached: currententrychange should not fire Reached unreachable code

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FAIL: Timed out waiting for notifyDone to be called

FAIL currententrychange fires for same-document navigation.back() and navigation.forward() assert_false: expected false got true

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL currententrychange fires for navigation.navigate() with replace assert_equals: expected -1 but got 1
FAIL currententrychange fires for navigation.navigate() with replace assert_equals: expected -1 but got 0

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL A cross-origin traversal does not fire the navigate event assert_equals: expected 1 but got 2
PASS A cross-origin traversal does not fire the navigate event

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


Harness Error (TIMEOUT), message = null

TIMEOUT A traversal that redirects from same-origin to cross-origin fires the navigate event Test timed out
PASS A traversal that redirects from same-origin to cross-origin fires the navigate event

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


PASS clicking on an <a> element that navigates same-document targeting a cross-origin window
FAIL clicking on an <a> element that navigates same-document targeting a cross-origin window assert_true: cancelable expected true got false

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Click me

PASS clicking on an <a> element that navigates same-document targeting a same-origin window
FAIL clicking on an <a> element that navigates same-document targeting a same-origin window assert_true: cancelable expected true got false

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL using location.href to navigate same-document targeting a cross-origin window assert_equals: navigationType expected "push" but got "replace"
FAIL using location.href to navigate same-document targeting a cross-origin window assert_true: cancelable expected true got false

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL using location.href to navigate same-document targeting a same-origin window assert_equals: navigationType expected "push" but got "replace"
FAIL using location.href to navigate same-document targeting a same-origin window assert_true: cancelable expected true got false

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL using window.open() to navigate same-document targeting a cross-origin window assert_equals: navigationType expected "push" but got "replace"
FAIL using window.open() to navigate same-document targeting a cross-origin window assert_true: cancelable expected true got false

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL using window.open() to navigate same-document targeting a same-origin-domain (but cross-origin) window assert_equals: navigationType expected "push" but got "replace"
FAIL using window.open() to navigate same-document targeting a same-origin-domain (but cross-origin) window assert_true: cancelable expected true got false

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL using window.open() to navigate same-document targeting a same-origin window assert_equals: navigationType expected "push" but got "replace"
FAIL using window.open() to navigate same-document targeting a same-origin window assert_true: cancelable expected true got false

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL submitting a <form> element that navigates same-document targeting a cross-origin window assert_equals: navigationType expected "push" but got "replace"
FAIL submitting a <form> element that navigates same-document targeting a cross-origin window assert_true: cancelable expected true got false

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL submitting a <form> element that navigates cross-document targeting a same-origin-domain (but cross-origin) window assert_equals: navigationType expected "push" but got "replace"
FAIL submitting a <form> element that navigates cross-document targeting a same-origin-domain (but cross-origin) window assert_true: cancelable expected true got false

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL submitting a <form> element that navigates same-document targeting a same-origin window assert_equals: navigationType expected "push" but got "replace"
FAIL submitting a <form> element that navigates same-document targeting a same-origin window assert_true: cancelable expected true got false

Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@

Harness Error (TIMEOUT), message = null

PASS can't bypass required members by omitting the dictionary entirely
PASS destination is required
TIMEOUT signal is required Test timed out
TIMEOUT all properties are reflected back Test timed out
TIMEOUT defaults are as expected Test timed out
TIMEOUT hasUAVisualTransition is default false Test timed out
PASS signal is required
PASS all properties are reflected back
PASS defaults are as expected
PASS hasUAVisualTransition is default false

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FAIL: Timed out waiting for notifyDone to be called

Harness Error (TIMEOUT), message = null

TIMEOUT Using intercept() then navigate() in the ensuing currententrychange should abort the finished promise (but not the committed promise) Test timed out

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FAIL: Timed out waiting for notifyDone to be called

Directory listing for /

%CERTS_DIR%
.cache
.gitattributes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Harness Error (TIMEOUT), message = null

TIMEOUT event.intercept() should proceed if the given promise resolves Test timed out
FAIL event.intercept() should proceed if the given promise resolves assert_equals: expected "#1" but got ""

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Harness Error (TIMEOUT), message = null

TIMEOUT event.intercept() should proceed if the given promise resolves Test timed out
FAIL event.intercept() should proceed if the given promise resolves assert_equals: expected "#1" but got ""

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FAIL: Timed out waiting for notifyDone to be called

Harness Error (TIMEOUT), message = null

TIMEOUT event.intercept() can intercept navigation.back() Test timed out

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Harness Error (TIMEOUT), message = null

TIMEOUT event.intercept() throws if invoked on a synthetic event Test timed out
PASS event.intercept() throws if invoked on a synthetic event

Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@


Harness Error (TIMEOUT), message = null

TIMEOUT navigate event destination after iframe detach Test timed out
PASS navigate event destination after iframe detach

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FAIL: Timed out waiting for notifyDone to be called

FAIL navigate event destination.index should be dynamic assert_equals: expected -1 but got 0

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

PASS navigate event destination.getState() on back/forward navigation
FAIL navigate event destination.getState() on back/forward navigation assert_not_equals: got disallowed value undefined

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL history.back() fires the navigate event and sets hashChange when reversing a fragment navigation assert_equals: expected "traverse" but got "push"
PASS history.back() fires the navigate event and sets hashChange when reversing a fragment navigation

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL history.back() fires the navigate event when reversing a pushState() assert_equals: expected "traverse" but got "push"
PASS history.back() fires the navigate event when reversing a pushState()

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Harness Error (TIMEOUT), message = null

TIMEOUT history.pushState() fires the navigate event Test timed out
FAIL history.pushState() fires the navigate event assert_false: expected false got true

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Harness Error (TIMEOUT), message = null

TIMEOUT history.replaceState() fires the navigate event Test timed out
FAIL history.replaceState() fires the navigate event assert_false: expected false got true

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL location API on another window fires navigate event in the target window only assert_equals: expected "push" but got "replace"
FAIL location API on another window fires navigate event in the target window only assert_true: expected true got false

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FAIL: Timed out waiting for notifyDone to be called

PASS navigate event for navigation.back() - same-document

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


Harness Error (TIMEOUT), message = null

TIMEOUT navigate event for navigation.back() - same-document in an iframe Test timed out
PASS navigate event for navigation.back() - same-document in an iframe

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL window.open() fires navigate event in target window but not source assert_equals: expected "push" but got "replace"
FAIL window.open() fires navigate event in target window but not source assert_true: expected true got false

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL window.open() fires navigate event when targeting self assert_equals: expected "push" but got "replace"
PASS window.open() fires navigate event when targeting self

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL navigation.back() cross-document cannot be cancelled with the navigate event assert_equals: expected 0 but got 2
PASS navigation.back() cross-document cannot be cancelled with the navigate event

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FAIL: Timed out waiting for notifyDone to be called

FAIL navigation.back() same-document preventDefault promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: navigateerror_called"

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


Harness Error (TIMEOUT), message = null

TIMEOUT navigation.traverseTo() in an iframe with same-document preventDefault in its parent Test timed out
FAIL navigation.traverseTo() in an iframe with same-document preventDefault in its parent assert_unreached: navigate event should not fire in the iframe, because the traversal was cancelled in the top window Reached unreachable code

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FAIL: Timed out waiting for notifyDone to be called
CONSOLE MESSAGE: Unhandled Promise Rejection: AbortError: Navigation aborted


PASS navigation.traverseTo() - if a top window cancels the traversal, any iframes should not fire navigate

Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
FAIL: Timed out waiting for notifyDone to be called
CONSOLE MESSAGE: RangeError: Maximum call stack size exceeded.

Harness Error (FAIL), message = RangeError: Maximum call stack size exceeded.

PASS replaceState inside a navigate event for navigation.back()

Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@


Harness Error (TIMEOUT), message = null

TIMEOUT navigation.currentEntry/entries()/canGoBack/canGoForward after iframe removal Test timed out
PASS navigation.currentEntry/entries()/canGoBack/canGoForward after iframe removal

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL Basic tests for navigation.currentEntry assert_not_equals: got disallowed value object "[object NavigationHistoryEntry]"
FAIL Basic tests for navigation.currentEntry assert_not_equals: got disallowed value "http://web-platform.test:8800/navigation-api/navigation-history-entry/current-basic.html#6"

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL entry.index should return -1 when not in navigation.entries() assert_equals: expected -1 but got 1
FAIL entry.index should return -1 when not in navigation.entries() assert_equals: expected -1 but got 0

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

FAIL NavigationHistoryEntry's key and id on same-document back navigation assert_not_equals: got disallowed value "c6782442-aa4a-487e-94a7-68b0ade1bcae"
Harness Error (TIMEOUT), message = null

PASS NavigationHistoryEntry's key and id on same-document back navigation

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL NavigationHistoryEntry's key and id after location.reload() assert_equals: expected "08f565c0-2333-4357-8371-4f4e83c6a28d" but got "df843c57-da51-481d-86ee-8668e6da624d"
FAIL NavigationHistoryEntry's key and id after location.reload() assert_equals: expected "dc17d31f-282e-4b1c-bd3d-b76a69dcd382" but got "3bf32a01-b088-40e6-ae3c-5967c1dff230"

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


PASS NavigationHistoryEntry's key and id after location.replace()
FAIL NavigationHistoryEntry's key and id after location.replace() assert_not_equals: got disallowed value "e669243f-8e2e-4ce9-8e98-37fcebc9196c"

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


FAIL NavigationHistoryEntry's key and id after location.replace() assert_equals: expected "8ea1a174-726c-42bd-b039-e8a4c1bf3523" but got "d54c00de-4c4e-401b-b5b8-b1d27e7f1dc6"
PASS NavigationHistoryEntry's key and id after location.replace()

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL entry.sameDocument after same-document navigations assert_not_equals: got disallowed value object "[object NavigationHistoryEntry]"
PASS entry.sameDocument after same-document navigations

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


Harness Error (TIMEOUT), message = null

TIMEOUT navigation.back() goes to the nearest back entry Test timed out
PASS navigation.back() goes to the nearest back entry

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


Harness Error (TIMEOUT), message = null

TIMEOUT navigation.forward() goes to the nearest forward entry Test timed out
PASS navigation.forward() goes to the nearest forward entry

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


Harness Error (TIMEOUT), message = null

TIMEOUT navigation.traverseTo() goes to the nearest entry when going back Test timed out
PASS navigation.traverseTo() goes to the nearest entry when going back

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


Harness Error (TIMEOUT), message = null

TIMEOUT navigation.traverseTo() goes to the nearest entry when going forward Test timed out
PASS navigation.traverseTo() goes to the nearest entry when going forward

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FAIL: Timed out waiting for notifyDone to be called

FAIL If forward pruning clobbers the target of a traverse, abort assert_equals: expected 1 but got 2

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE MESSAGE: Unhandled Promise Rejection: Error: assert_equals: expected "4ee017b9-616c-4b0e-84b8-06f91fea3afd" but got "a73e2a7c-e045-4897-946e-9cec39c2a75f"
CONSOLE MESSAGE: Unhandled Promise Rejection: Error: assert_equals: expected "34c66e70-c401-4b89-b4df-11f4c044fff7" but got "519e15d0-f2c0-45d0-b0eb-159df815a265"

PASS navigate() with history: 'replace' option

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL back() promises assert_equals: expected "#1" but got ""
PASS back() promises

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

FAIL back() and intercept() with a fulfilled promise assert_equals: expected "#1" but got ""
Harness Error (TIMEOUT), message = null

TIMEOUT back() and intercept() with a fulfilled promise Test timed out

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

FAIL back() promise rejection with rejected intercept() assert_equals: expected "#1" but got ""
Harness Error (TIMEOUT), message = null

TIMEOUT back() promise rejection with rejected intercept() Test timed out

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FAIL: Timed out waiting for notifyDone to be called

PASS forward() promises

Loading

0 comments on commit 7e54fb8

Please sign in to comment.