-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add redirected cases to CSP/import tests in wpt/worklets
Also this CL replaces some of empty-worklet-script.js usage in CSP tests with empty-worklet-script-with-cors-header.js to make sure worklets are rejected due to CSP, not CORS. Change-Id: Ie463d206254c4c6728a79dae0ad79e4f7e333b92 Reviewed-on: https://chromium-review.googlesource.com/c/1312146 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#606846}
- Loading branch information
1 parent
4176e9e
commit 21d42bf
Showing
6 changed files
with
183 additions
and
98 deletions.
There are no files selected for viewing
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
5 changes: 5 additions & 0 deletions
5
worklets/resources/import-insecure-origin-redirected-empty-worklet-script.sub.js
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Some tests rely on some unintuitive cleverness due to WPT's test setup: | ||
// 'Upgrade-Insecure-Requests' does not upgrade the port number, so we use URLs | ||
// in the form `http://[host]:[https-port]`. If the upgrade fails, the load will | ||
// fail, as we don't serve HTTP over the secure port. | ||
import '/common/redirect.py?location=http://{{host}}:{{ports[https][0]}}/worklets/resources/empty-worklet-script-with-cors-header.js'; |
2 changes: 1 addition & 1 deletion
2
worklets/resources/import-remote-origin-empty-worklet-script.sub.js
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 +1 @@ | ||
import 'https://{{domains[www1]}}:{{ports[https][0]}}/worklets/resources/empty-worklet-script.js'; | ||
import 'https://{{domains[www1]}}:{{ports[https][0]}}/worklets/resources/empty-worklet-script-with-cors-header.js'; |
1 change: 1 addition & 0 deletions
1
worklets/resources/import-remote-origin-redirected-empty-worklet-script.sub.js
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
import '/common/redirect.py?location=https://{{domains[www1]}}:{{ports[https][0]}}/worklets/resources/empty-worklet-script-with-cors-header.js'; |
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