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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/base-uri/base-uri-deny.sub.html

Issue 2890763002: Un-skipped wpt/content-security-policy/base-uri (Closed)
Patch Set: Created 3 years, 7 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 <html>
3 <head>
4 <meta http-equiv="Content-Security-Policy" content="base-uri {{location[sche me]}}://{{domains[www1]}}:{{ports[http][0]}}/">
5 <script src='/resources/testharness.js'></script>
6 <script src='/resources/testharnessreport.js'></script>
7
8 <script>
9 var t = async_test("Check that baseURI fires a securitypolicyviolation eve nt when it does not match the csp directive");
10 window.addEventListener('securitypolicyviolation', t.step_func_done(functi on(e) {
11 assert_equals(e.blockedURI, "{{location[scheme]}}://{{domains[www2]}}:{{ ports[http][0]}}/")
12 assert_equals(e.violatedDirective, "base-uri");
13 }));
14 </script>
15
16 <base href="{{location[scheme]}}://{{domains[www2]}}:{{ports[http][0]}}/">
17 <script>
18 test(function() {
19 assert_not_equals(document.baseURI, "{{location[scheme]}}://{{domains[www2 ]}}:{{ports[http][0]}}/");
Mike West 2017/05/17 12:34:43 Can you instead assert that the baseURI is the cur
andypaicu 2017/05/17 13:34:13 Done
20 t.done();
21 }, "Check that the baseURI is not set when it does not match the csp directi ve");
22 </script>
23 </head>
24 <body>
25 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698