-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Navigation] Implement the "abort the ongoing navigation" algorithm
https://bugs.webkit.org/show_bug.cgi?id=274170 Reviewed by Alex Christensen. Implement the "abort the ongoing navigation" algorithm [1]. Use it to abort ongoing navigations when a new one starts and to abort events with defaultPrevented. [1] https://html.spec.whatwg.org/multipage/nav-history-apis.html#abort-the-ongoing-navigation * LayoutTests/imported/w3c/web-platform-tests/navigation-api/currententrychange-event/navigation-navigate-preventDefault-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/navigate-interrupted-within-onnavigate-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/navigate-preventDefault-expected.txt: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/entry-after-detach-expected.txt: * Source/WebCore/page/Navigation.cpp: (WebCore::Navigation::rejectFinishedPromise): (WebCore::Navigation::abortOngoingNavigation): (WebCore::Navigation::innerDispatchNavigateEvent): * Source/WebCore/page/Navigation.h: Canonical link: https://commits.webkit.org/278874@main
- Loading branch information
Showing
6 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
4 changes: 1 addition & 3 deletions
4
...s/navigation-api/currententrychange-event/navigation-navigate-preventDefault-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
Harness Error (TIMEOUT), message = null | ||
|
||
TIMEOUT currententrychange does not fire when onnavigate preventDefault() is called Test timed out | ||
PASS currententrychange does not fire when onnavigate preventDefault() is called | ||
|
4 changes: 3 additions & 1 deletion
4
...n-api/navigation-methods/return-value/navigate-interrupted-within-onnavigate-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
FAIL: Timed out waiting for notifyDone to be called | ||
CONSOLE MESSAGE: Unhandled Promise Rejection: AbortError: Navigation aborted | ||
|
||
FAIL if navigate() is called inside onnavigate, the previous navigation and navigate event are cancelled assert_array_equals: expected property 1 to be "#2" but got "" (expected array ["", "#2"] got ["", ""]) | ||
|
4 changes: 1 addition & 3 deletions
4
...tests/navigation-api/navigation-methods/return-value/navigate-preventDefault-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
Harness Error (TIMEOUT), message = null | ||
|
||
TIMEOUT navigate() when the onnavigate handler calls preventDefault() Test timed out | ||
PASS navigate() when the onnavigate handler calls preventDefault() | ||
|
2 changes: 1 addition & 1 deletion
2
...eb-platform-tests/navigation-api/navigation-history-entry/entry-after-detach-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL NavigationHistoryEntry properties after detach assert_equals: expected (object) null but got (string) "http://web-platform.test:8800/common/blank.html" | ||
PASS NavigationHistoryEntry properties after detach | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters