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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-original-url.php

Issue 2790693002: Split CSP into pre- and post-upgrade checks (Closed)
Patch Set: add mkwst TODO Created 3 years, 8 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/report-original-url.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-original-url.php b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-original-url.php
index 321f56449ea0ea660ae4ed8b2e39547598a52f87..10b18c822f3ef733171af28788b9a8644cecfa2a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-original-url.php
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-original-url.php
@@ -1,5 +1,5 @@
<?php
- header("Content-Security-Policy-Report-Only: img-src http://allowed.test");
+ header("Content-Security-Policy-Report-Only: img-src http://allowed.test");
?>
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
@@ -29,17 +29,15 @@ async_test(t => {
async_test(t => {
var i = document.createElement('img');
- // TODO(mkwst): This should be `http://allowed.test:8000/security/resources/redir.php?url=...`
- // rather than the redirect target: https://crbug.com/613960
- createListener("http://127.0.0.1:8000/security/resources/compass.jpg?t=3", t);
- i.src = "http://allowed.test:8000/security/resources/redir.php?url=" + encodeURIComponent("http://127.0.0.1:8000/security/resources/compass.jpg?t=3");
+ var url = "http://allowed.test:8000/security/resources/redir.php?url=" + encodeURIComponent("http://127.0.0.1:8000/security/resources/compass.jpg?t=3");
+ createListener(url, t);
+ i.src = url;
}, "Block after redirect, same-origin = original URL in report");
async_test(t => {
var i = document.createElement('img');
- // TODO(mkwst): This should be `http://allowed.test:8000/security/resources/redir.php?url=...`
- // rather than the redirect target: https://crbug.com/613960
- createListener("http://blocked.test:8000", t);
- i.src = "http://allowed.test:8000/security/resources/redir.php?url=" + encodeURIComponent("http://blocked.test:8000/security/resources/compass.jpg?t=4");
+ var url = "http://allowed.test:8000/security/resources/redir.php?url=" + encodeURIComponent("http://blocked.test:8000/security/resources/compass.jpg?t=4");
+ createListener(url, t);
+ i.src = url;
}, "Block after redirect, cross-origin = original URL in report");
</script>

Powered by Google App Engine
This is Rietveld 408576698