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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/securitypolicyviolation/securitypolicyviolation-block-image-from-script.sub.html

Issue 2711913003: Upstream Blink's 'securitypolicyviolation' tests. (Closed)
Patch Set: MANIFEST Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
4 <script src="/content-security-policy/support/testharness-helper.js"></script>
5 <meta http-equiv="Content-Security-Policy" content="img-src 'none'">
6 <body>
7 <script>
8 async_test(t => {
9 waitUntilEvent(window, "securitypolicyviolation")
10 .then(t.step_func_done(e => {
11 assert_equals(e.documentURI, document.location.toString());
12 assert_equals(e.referrer, document.referrer);
13 assert_equals(e.blockedURI, "http://{{domains[www]}}:{{ports[http][0]}}/ content-security-policy/support/fail.png");
14 assert_equals(e.violatedDirective, "img-src");
15 assert_equals(e.effectiveDirective, "img-src");
16 assert_equals(e.originalPolicy, "img-src \'none\'");
17 assert_equals(e.disposition, "enforce");
18 assert_equals(e.sourceFile, "");
19 assert_equals(e.lineNumber, 0);
20 assert_equals(e.columnNumber, 0);
21 assert_equals(e.statusCode, 200);
22 }));
23
24 var s = document.createElement("script");
25 s.src = "/content-security-policy/support/inject-image.sub.js";
26 document.body.appendChild(s);
27 }, "Non-redirected cross-origin URLs are not stripped.");
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698