You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Worklet.addModule() should reject promise with an AbortError when the network load fails
https://bugs.webkit.org/show_bug.cgi?id=219135
Reviewed by Geoffrey Garen.
LayoutTests/imported/w3c:
Rebaseline WPT tests now that more checks are passing (or keep failing with slighly different
output).
* web-platform-tests/worklets/audio-worklet-credentials.https-expected.txt:
* web-platform-tests/worklets/audio-worklet-import.https-expected.txt:
Source/WebCore:
Worklet.addModule() should reject promise with an AbortError when the network load fails:
- https://html.spec.whatwg.org/multipage/worklets.html#dom-worklet-addmodule
This also aligns our behavior with Blink.
No new tests, rebaselined existing tests.
* worklets/WorkletGlobalScope.cpp:
(WebCore::WorkletGlobalScope::notifyFinished):
LayoutTests:
Update existing tests to reflect behavior change.
* http/wpt/webaudio/audioworklet-addModule-cors.sub.https.html:
* webaudio/audioworklet-addModule-failure-expected.txt:
* webaudio/audioworklet-addModule-failure.html:
Canonical link: https://commits.webkit.org/231774@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CONSOLE MESSAGE: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin.
2
2
3
-
FAIL Importing a same-origin script with the default WorkletOptions should send the credentials promise_test: Unhandled rejection with value: object "NetworkError: Failed to fetch module, error: Response is not 2xx"
3
+
FAIL Importing a same-origin script with the default WorkletOptions should send the credentials promise_test: Unhandled rejection with value: object "AbortError: Failed to fetch module, error: Response is not 2xx"
4
4
PASS Importing a remote-origin script with the default WorkletOptions should not send the credentials
5
-
FAIL Importing a same-origin script with credentials=omit should not send the credentials promise_test: Unhandled rejection with value: object "NetworkError: Failed to fetch module, error: Response is not 2xx"
5
+
FAIL Importing a same-origin script with credentials=omit should not send the credentials promise_test: Unhandled rejection with value: object "AbortError: Failed to fetch module, error: Response is not 2xx"
6
6
PASS Importing a remote-origin script with credentials=omit should not send the credentials
7
-
FAIL Importing a same-origin script with credentials=same-origin should send the credentials promise_test: Unhandled rejection with value: object "NetworkError: Failed to fetch module, error: Response is not 2xx"
7
+
FAIL Importing a same-origin script with credentials=same-origin should send the credentials promise_test: Unhandled rejection with value: object "AbortError: Failed to fetch module, error: Response is not 2xx"
8
8
PASS Importing a remote-origin script with credentials=same-origin should not send the credentials
9
-
FAIL Importing a same-origin script with credentials=include should send the credentials promise_test: Unhandled rejection with value: object "NetworkError: Failed to fetch module, error: Response is not 2xx"
10
-
FAIL Importing a remote-origin script with credentials=include should send the credentials promise_test: Unhandled rejection with value: object "NetworkError: Failed to fetch module, error: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin."
9
+
FAIL Importing a same-origin script with credentials=include should send the credentials promise_test: Unhandled rejection with value: object "AbortError: Failed to fetch module, error: Response is not 2xx"
10
+
FAIL Importing a remote-origin script with credentials=include should send the credentials promise_test: Unhandled rejection with value: object "AbortError: Failed to fetch module, error: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin."
Copy file name to clipboardExpand all lines: LayoutTests/imported/w3c/web-platform-tests/worklets/audio-worklet-import.https-expected.txt
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,16 @@ PASS Importing scripts resolves all the given promises.
6
6
PASS Importing nested scripts resolves the given promise
7
7
PASS Importing cyclic scripts resolves the given promise
8
8
PASS Importing a script which throws should still resolve the given promise.
9
-
FAIL Importing a non-existent script rejects the given promise with an AbortError. promise_rejects_dom: function "function () { throw e }" threw object "NetworkError: Failed to fetch module, error: Response is not 2xx" that is not a DOMException AbortError: property "code" is equal to 19, expected 20
9
+
PASS Importing a non-existent script rejects the given promise with an AbortError.
10
10
PASS Importing an invalid URL should reject the given promise with a SyntaxError.
11
11
PASS Importing a blob URL should resolve the given promise.
12
-
FAIL Importing a file:// URL should reject the given promise. promise_rejects_dom: function "function () { throw e }" threw object "NetworkError: Failed to fetch module, error: Cross origin requests are only supported for HTTP." that is not a DOMException AbortError: property "code" is equal to 19, expected 20
13
-
FAIL Importing a data URL should resolve the given promise. promise_test: Unhandled rejection with value: object "NetworkError: Failed to fetch module, error: Cross origin requests are only supported for HTTP."
14
-
FAIL Importing about:blank should reject the given promise. promise_rejects_dom: function "function () { throw e }" threw object "NetworkError: Failed to fetch module, error: Cross origin requests are only supported for HTTP." that is not a DOMException AbortError: property "code" is equal to 19, expected 20
12
+
PASS Importing a file:// URL should reject the given promise.
13
+
FAIL Importing a data URL should resolve the given promise. promise_test: Unhandled rejection with value: object "AbortError: Failed to fetch module, error: Cross origin requests are only supported for HTTP."
14
+
PASS Importing about:blank should reject the given promise.
15
15
PASS Importing a cross origin resource with the Access-Control-Allow-Origin header should resolve the given promise
16
-
FAIL Importing a cross origin resource without the Access-Control-Allow-Origin header should reject the given promise promise_rejects_dom: function "function () { throw e }" threw object "NetworkError: Failed to fetch module, error: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin." that is not a DOMException AbortError: property "code" is equal to 19, expected 20
16
+
PASS Importing a cross origin resource without the Access-Control-Allow-Origin header should reject the given promise
17
17
PASS Importing a cross-origin-redirected resource with the Access-Control-Allow-Origin header should resolve the given promise
18
-
FAIL Importing a cross-origin-redirected resource without the Access-Control-Allow-Origin header should reject the given promise promise_rejects_dom: function "function () { throw e }" threw object "NetworkError: Failed to fetch module, error: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin." that is not a DOMException AbortError: property "code" is equal to 19, expected 20
18
+
PASS Importing a cross-origin-redirected resource without the Access-Control-Allow-Origin header should reject the given promise
19
19
FAIL Importing a script that has a syntax error should reject the given promise. assert_unreached: Should have rejected: undefined Reached unreachable code
20
20
FAIL Importing a nested script that has a syntax error should reject the given promise. assert_unreached: Should have rejected: undefined Reached unreachable code
21
21
FAIL Importing a script that imports an invalid identifier should reject the given promise. assert_unreached: Should have rejected: undefined Reached unreachable code
Copy file name to clipboardExpand all lines: LayoutTests/webaudio/audioworklet-addModule-failure-expected.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
4
4
5
5
6
6
PASS context.audioWorklet.addModule(invalidURL); rejected promise with SyntaxError: Module URL is invalid.
7
-
PASS context.audioWorklet.addModule('doesnotExist.js'); rejected promise with NetworkError: Failed to fetch module, error: The requested URL was not found on this server..
7
+
PASS context.audioWorklet.addModule('doesnotExist.js'); rejected promise with AbortError: Failed to fetch module, error: The requested URL was not found on this server..
0 commit comments