-
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] Support download navigations
https://bugs.webkit.org/show_bug.cgi?id=272349 Reviewed by Alex Christensen. Implement detecting download requests and firing a navigate event for them [1]. [1] https://html.spec.whatwg.org/multipage/nav-history-apis.html#fire-a-download-request-navigate-event * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-anchor-download-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-anchor-download-userInitiated-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/navigation-api/ordering-and-transition/anchor-download-expected.txt: * Source/WebCore/loader/PolicyChecker.cpp: (WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy): * Source/WebCore/page/Navigation.cpp: (WebCore::Navigation::dispatchDownloadNavigateEvent): Canonical link: https://commits.webkit.org/278950@main
- Loading branch information
Showing
5 changed files
with
19 additions
and
14 deletions.
There are no files selected for viewing
10 changes: 4 additions & 6 deletions
10
...3c/web-platform-tests/navigation-api/navigate-event/navigate-anchor-download-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,8 +1,6 @@ | ||
|
||
Harness Error (TIMEOUT), message = null | ||
|
||
TIMEOUT <a> fires navigate and populates downloadRequest with '' Test timed out | ||
TIMEOUT <a> fires navigate and populates downloadRequest with 'filename' Test timed out | ||
TIMEOUT <area> fires navigate and populates downloadRequest with '' Test timed out | ||
TIMEOUT <area> fires navigate and populates downloadRequest with 'filename' Test timed out | ||
PASS <a> fires navigate and populates downloadRequest with '' | ||
PASS <a> fires navigate and populates downloadRequest with 'filename' | ||
PASS <area> fires navigate and populates downloadRequest with '' | ||
PASS <area> fires navigate and populates downloadRequest with 'filename' | ||
|
4 changes: 1 addition & 3 deletions
4
...m-tests/navigation-api/navigate-event/navigate-anchor-download-userInitiated-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,6 +1,4 @@ | ||
Click me | ||
|
||
Harness Error (TIMEOUT), message = null | ||
|
||
TIMEOUT <a download> click fires navigate event Test timed out | ||
PASS <a download> click fires navigate event | ||
|
2 changes: 1 addition & 1 deletion
2
...3c/web-platform-tests/navigation-api/ordering-and-transition/anchor-download-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,4 +1,4 @@ | ||
|
||
|
||
FAIL <a download> fires navigate, but not navigatesuccess or navigateerror when not intercepted by intercept() assert_true: expected true got false | ||
PASS <a download> fires navigate, but not navigatesuccess or navigateerror when not intercepted by intercept() | ||
|
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