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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/sandbox-inherit-to-blank-document.php

Issue 1835463002: Stop supporting invalid CSP directives in meta tags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove service worker extendable event test Created 4 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 unified diff | Download patch
OLDNEW
1 <?php
2 header("Content-Security-Policy: sandbox allow-scripts allow-popups");
3 ?>
1 <!DOCTYPE html> 4 <!DOCTYPE html>
2 <html> 5 <html>
3 <head> 6 <head>
4 <meta http-equiv="Content-Security-Policy" content="sandbox allow-scripts al low-popups">
5 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 8 <script src="/resources/testharnessreport.js"></script>
7 </head> 9 </head>
8 <body> 10 <body>
9 <a target='_blank' href='/security/resources/post-origin-to-opener.html'></a > 11 <a target='_blank' href='/security/resources/post-origin-to-opener.html'></a >
10 <script> 12 <script>
11 if (window.testRunner) { 13 if (window.testRunner) {
12 testRunner.setCanOpenWindows(); 14 testRunner.setCanOpenWindows();
13 testRunner.setCloseRemainingWindowsWhenComplete(true); 15 testRunner.setCloseRemainingWindowsWhenComplete(true);
14 } 16 }
15 17
16 var test = async_test("Testing sandbox inherited via target='_blank'"); 18 var test = async_test("Testing sandbox inherited via target='_blank'");
17 19
18 window.addEventListener("message", test.step_func(function (e) { 20 window.addEventListener("message", test.step_func(function (e) {
19 assert_equals(document.origin, 'null'); 21 assert_equals(document.origin, 'null');
20 assert_equals(e.data.origin, 'null'); 22 assert_equals(e.data.origin, 'null');
21 test.done(); 23 test.done();
22 })); 24 }));
23 25
24 test.step(function () { 26 test.step(function () {
25 var link = document.querySelector('a'); 27 var link = document.querySelector('a');
26 link.click(); 28 link.click();
27 }); 29 });
28 </script> 30 </script>
29 </body> 31 </body>
30 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698