Changeset 270033 in webkit
- Timestamp:
- Nov 19, 2020 9:23:47 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r270031 r270033 1 2020-11-19 Chris Dumez <cdumez@apple.com> 2 3 Worklet.addModule() should reject promise with an AbortError when the network load fails 4 https://bugs.webkit.org/show_bug.cgi?id=219135 5 6 Reviewed by Geoffrey Garen. 7 8 Update existing tests to reflect behavior change. 9 10 * http/wpt/webaudio/audioworklet-addModule-cors.sub.https.html: 11 * webaudio/audioworklet-addModule-failure-expected.txt: 12 * webaudio/audioworklet-addModule-failure.html: 13 1 14 2020-11-19 Commit Queue <commit-queue@webkit.org> 2 15 -
trunk/LayoutTests/http/wpt/webaudio/audioworklet-addModule-cors.sub.https.html
r268872 r270033 17 17 promise_test((t) => { 18 18 const context = new OfflineAudioContext(2, 100, 44100); 19 return promise_rejects_dom(t, " NetworkError", context.audioWorklet.addModule("https://{{hosts[alt][]}}:{{ports[https][0]}}/WebKit/webaudio/resources/dummy-worklet.py"));19 return promise_rejects_dom(t, "AbortError", context.audioWorklet.addModule("https://{{hosts[alt][]}}:{{ports[https][0]}}/WebKit/webaudio/resources/dummy-worklet.py")); 20 20 }, "cross origin fails without CORS headers"); 21 21 -
trunk/LayoutTests/imported/w3c/ChangeLog
r270032 r270033 1 2020-11-19 Chris Dumez <cdumez@apple.com> 2 3 Worklet.addModule() should reject promise with an AbortError when the network load fails 4 https://bugs.webkit.org/show_bug.cgi?id=219135 5 6 Reviewed by Geoffrey Garen. 7 8 Rebaseline WPT tests now that more checks are passing (or keep failing with slighly different 9 output). 10 11 * web-platform-tests/worklets/audio-worklet-credentials.https-expected.txt: 12 * web-platform-tests/worklets/audio-worklet-import.https-expected.txt: 13 1 14 2020-11-19 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/worklets/audio-worklet-credentials.https-expected.txt
r270016 r270033 1 1 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." 11 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/worklets/audio-worklet-import.https-expected.txt
r270016 r270033 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 -
trunk/LayoutTests/webaudio/audioworklet-addModule-failure-expected.txt
r268057 r270033 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.. 8 8 PASS successfullyParsed is true 9 9 -
trunk/LayoutTests/webaudio/audioworklet-addModule-failure.html
r268057 r270033 12 12 context = new OfflineAudioContext(2, 100, 44100); 13 13 await shouldRejectWithErrorName("context.audioWorklet.addModule(invalidURL);", "SyntaxError"); 14 await shouldRejectWithErrorName("context.audioWorklet.addModule('doesnotExist.js');", " NetworkError");14 await shouldRejectWithErrorName("context.audioWorklet.addModule('doesnotExist.js');", "AbortError"); 15 15 finishJSTest(); 16 16 } -
trunk/Source/WebCore/ChangeLog
r270029 r270033 1 2020-11-19 Chris Dumez <cdumez@apple.com> 2 3 Worklet.addModule() should reject promise with an AbortError when the network load fails 4 https://bugs.webkit.org/show_bug.cgi?id=219135 5 6 Reviewed by Geoffrey Garen. 7 8 Worklet.addModule() should reject promise with an AbortError when the network load fails: 9 - https://html.spec.whatwg.org/multipage/worklets.html#dom-worklet-addmodule 10 11 This also aligns our behavior with Blink. 12 13 No new tests, rebaselined existing tests. 14 15 * worklets/WorkletGlobalScope.cpp: 16 (WebCore::WorkletGlobalScope::notifyFinished): 17 1 18 2020-11-19 Antti Koivisto <antti@apple.com> 2 19 -
trunk/Source/WebCore/worklets/WorkletGlobalScope.cpp
r269974 r270033 199 199 200 200 if (m_scriptLoader->failed()) { 201 didCompleteScriptFetchJob(WTFMove(completedJob), Exception { NetworkError, makeString("Failed to fetch module, error: ", m_scriptLoader->error().localizedDescription()) });201 didCompleteScriptFetchJob(WTFMove(completedJob), Exception { AbortError, makeString("Failed to fetch module, error: ", m_scriptLoader->error().localizedDescription()) }); 202 202 return; 203 203 }
Note: See TracChangeset
for help on using the changeset viewer.