| Index: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/support/connect-src-self.sub.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/workers/resources/connect-src-self.js b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/support/connect-src-self.sub.js
|
| similarity index 52%
|
| rename from third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/workers/resources/connect-src-self.js
|
| rename to third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/support/connect-src-self.sub.js
|
| index aaf3554804b031578a05739c6dac1ea092dd39ef..f7332e35ba2da2f8902209e53e2600cf5347f057 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/workers/resources/connect-src-self.js
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/support/connect-src-self.sub.js
|
| @@ -1,17 +1,17 @@
|
| -importScripts("http://127.0.0.1:8000/resources/testharness.js");
|
| -importScripts("http://127.0.0.1:8000/security/contentSecurityPolicy/resources/testharness-helper.js");
|
| +importScripts("{{location[server]}}/resources/testharness.js");
|
| +importScripts("{{location[server]}}/content-security-policy/support/testharness-helper.js");
|
|
|
| // Same-origin
|
| async_test(t => {
|
| - var url = "http://127.0.0.1:8000/security/resources/cors-hello.php?same-origin-fetch";
|
| + var url = "{{location[server]}}/common/text-plain.txt?same-origin-fetch";
|
| assert_no_csp_event_for_url(t, url);
|
|
|
| fetch(url)
|
| .then(t.step_func_done(r => assert_equals(r.status, 200)));
|
| -}, "Same-origin 'fetch()' in " + self.location.protocol);
|
| +}, "Same-origin 'fetch()' in " + self.location.protocol + self.location.search);
|
|
|
| async_test(t => {
|
| - var url = "http://127.0.0.1:8000/security/resources/cors-hello.php?same-origin-xhr";
|
| + var url = "{{location[server]}}/common/text-plain.txt?same-origin-xhr";
|
| assert_no_csp_event_for_url(t, url);
|
|
|
| var xhr = new XMLHttpRequest();
|
| @@ -22,21 +22,21 @@ async_test(t => {
|
| assert_unreached();
|
| }
|
| xhr.send();
|
| -}, "Same-origin XHR in " + self.location.protocol);
|
| +}, "Same-origin XHR in " + self.location.protocol + self.location.search);
|
|
|
| // Cross-origin
|
| async_test(t => {
|
| - var url = "http://example.test:8000/security/resources/cors-hello.php?cross-origin-fetch";
|
| + var url = "http://{{domains[www]}}:{{ports[http][1]}}/common/text-plain.txt?cross-origin-fetch";
|
|
|
| Promise.all([
|
| waitUntilCSPEventForURL(t, url),
|
| fetch(url)
|
| .catch(t.step_func(e => assert_true(e instanceof TypeError)))
|
| ]).then(_ => t.done());
|
| -}, "Cross-origin 'fetch()' in " + self.location.protocol);
|
| +}, "Cross-origin 'fetch()' in " + self.location.protocol + self.location.search);
|
|
|
| async_test(t => {
|
| - var url = "http://example.test:8000/security/resources/cors-hello.php?cross-origin-xhr";
|
| + var url = "http://{{domains[www]}}:{{ports[http][1]}}/common/text-plain.txt?cross-origin-xhr";
|
|
|
| Promise.all([
|
| waitUntilCSPEventForURL(t, url),
|
| @@ -50,15 +50,15 @@ async_test(t => {
|
| }
|
| })
|
| ]).then(_ => t.done());
|
| -}, "Cross-origin XHR in " + self.location.protocol);
|
| +}, "Cross-origin XHR in " + self.location.protocol + self.location.search);
|
|
|
| // Same-origin redirecting to cross-origin
|
| async_test(t => {
|
| - var url = "http://127.0.0.1:8000/security/resources/redir.php?url=http://example.test:8000/security/resources/cors-hello.php?cross-origin-fetch";
|
| + var url = "{{location[server]}}/common/redirect-opt-in.py?status=307&location=http://{{domains[www]}}:{{ports[http][1]}}/common/text-plain.txt?cross-origin-fetch";
|
| // TODO(mkwst): The event should be firing. :(
|
|
|
| fetch(url)
|
| .catch(t.step_func_done(e => assert_true(e instanceof TypeError)))
|
| -}, "Same-origin => cross-origin 'fetch()' in " + self.location.protocol);
|
| +}, "Same-origin => cross-origin 'fetch()' in " + self.location.protocol + self.location.search);
|
|
|
| done();
|
|
|