| Index: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/support/connect-src-allow.sub.js
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/support/connect-src-allow.sub.js b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/support/connect-src-allow.sub.js
|
| index 97a32179e591c3a57d50442d947948ec246e1790..7ba44e53634311ec1100a5a3aa2565ec9248ba00 100644
|
| --- a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/support/connect-src-allow.sub.js
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/support/connect-src-allow.sub.js
|
| @@ -15,12 +15,9 @@ async_test(t => {
|
| assert_no_csp_event_for_url(t, url);
|
|
|
| var xhr = new XMLHttpRequest();
|
| - try {
|
| - xhr.open("GET", url);
|
| - t.done();
|
| - } catch (e) {
|
| - assert_unreached();
|
| - }
|
| + xhr.open("GET", url);
|
| + xhr.onload = t.step_func_done();
|
| + xhr.onerror = t.unreached_func();
|
| xhr.send();
|
| }, "Same-origin XHR in " + self.location.protocol + self.location.search);
|
|
|
| @@ -38,12 +35,9 @@ async_test(t => {
|
| assert_no_csp_event_for_url(t, url);
|
|
|
| var xhr = new XMLHttpRequest();
|
| - try {
|
| - xhr.open("GET", url);
|
| - t.done();
|
| - } catch (e) {
|
| - assert_unreached();
|
| - }
|
| + xhr.open("GET", url);
|
| + xhr.onload = t.step_func_done();
|
| + xhr.onerror = t.unreached_func();
|
| xhr.send();
|
| }, "Cross-origin XHR in " + self.location.protocol + self.location.search);
|
|
|
|
|