Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/support/inside-worker.sub.js

Issue 2711913003: Upstream Blink's 'securitypolicyviolation' tests. (Closed)
Patch Set: MANIFEST Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/support/inside-worker.sub.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/resources/inside-worker.php b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/support/inside-worker.sub.js
similarity index 72%
rename from third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/resources/inside-worker.php
rename to third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/support/inside-worker.sub.js
index 42ee891f9c0f7f5b8cf06b9d2c30fe90af64cb46..6e0d98c9577f632bba3c15f5e665788f6e582fed 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/resources/inside-worker.php
+++ b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/support/inside-worker.sub.js
@@ -1,9 +1,5 @@
-<?php
- header("Content-Type: application/javascript");
- header("Content-Security-Policy: connect-src http://127.0.0.1:8000");
-?>
-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[scheme]}}://{{host}}:{{location[port]}}/resources/testharness.js");
+importScripts("{{location[scheme]}}://{{host}}:{{location[port]}}/content-security-policy/support/testharness-helper.js");
var cspEventFiredInDocument = false;
// ServiceWorker and Worker
@@ -20,7 +16,7 @@ self.addEventListener("connect", c => {
});
async_test(t => {
- var url = "http://127.0.0.1:8000/security/resources/cors-hello.php";
+ var url = "{{location[scheme]}}://{{host}}:{{location[port]}}/content-security-policy/support/resource.py";
assert_no_csp_event_for_url(t, url);
fetch(url)
@@ -32,7 +28,7 @@ async_test(t => {
}, "No SecurityPolicyViolation event fired for successful load.");
async_test(t => {
- var url = "http://1.example.test:8000/security/resources/cors-hello.php";
+ var url = "{{location[scheme]}}://{{domains[www2]}}:{{location[port]}}/content-security-policy/support/resource.py";
waitUntilCSPEventForURL(t, url)
.then(t.step_func_done(e => {
assert_equals(e.blockedURI, url);

Powered by Google App Engine
This is Rietveld 408576698