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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/allow_csp_from-header.html

Issue 2431353002: Fixing allow_csp_from.html test and enabling it back in sit-per-process (Closed)
Patch Set: Style Created 4 years, 2 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/http/tests/security/contentSecurityPolicy/embeddedEnforcement/allow_csp_from-header.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/allow_csp_from-header.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/allow_csp_from-header.html
index 6c5d8c67c2998c5b278e36a23c36c60ec1ec5530..c1f81495fd8129fcb870f4d132e7248884ff3062 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/allow_csp_from-header.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/allow_csp_from-header.html
@@ -7,9 +7,6 @@
</head>
<body>
<script>
- var imgLineNumber = 20;
- var scriptAbcLineNumber = 21;
-
async_test(t => {
csp = "img-src 'none'; script-src 'unsafe-inline';";
url = generateUrlWithAllowCSPFrom(SAME_ORIGIN, "");
@@ -51,7 +48,6 @@
if (e.source != i.contentWindow || e.data["securitypolicyviolation"] != true)
return;
assert_equals(e.data["blockedURI"], "inline");
- assert_equals(e.data["lineNumber"], scriptAbcLineNumber);
t.done();
}));
@@ -70,7 +66,6 @@
return;
assert_equals(e.data["blockedURI"],
"http://localhost:8000/security/contentSecurityPolicy/resources/green250x50.png");
- assert_equals(e.data["lineNumber"], imgLineNumber);
t.done();
}));
@@ -79,11 +74,7 @@
async_test(t => {
csp = "script-src 'unsafe-inline'; img-src 'none'";
- url = "http://localhost:8000/security/contentSecurityPolicy/resources/respond-with-allow-csp-from-multiple-headers.php?allow_csp_from=";
- var i = document.createElement('iframe');
- i.csp = csp;
- i.src = url + "http://localhost:8000" + "&allow_csp_from_2=*";
-
+ url = "http://localhost:8000/security/contentSecurityPolicy/resources/respond-with-allow-csp-from-multiple-headers.php?allow_csp_from=" + "http://localhost:8000" + "&allow_csp_from_2=*";
injectIframeWithCSP(url, EXPECT_BLOCK, csp, t, "7");
}, "Only first Allow-CSP-From header is considered.");
</script>

Powered by Google App Engine
This is Rietveld 408576698