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

Side by Side Diff: LayoutTests/http/tests/security/sandbox-inherit-to-blank-document-unsandboxed.html

Issue 1139933002: Prototype an 'allow-unsandboxed-auxiliary' sandbox flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Feedback. Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/SandboxFlags.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta http-equiv="Content-Security-Policy" content="sandbox allow-scripts al low-popups"> 4 <meta http-equiv="Content-Security-Policy" content="sandbox allow-scripts al low-popups allow-unsandboxed-auxiliary">
5 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testharnessreport.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <a target='_blank' href='/security/resources/post-origin-to-opener.html'></a > 9 <a target='_blank' href='/security/resources/post-origin-to-opener.html'></a >
10 <script> 10 <script>
11 if (window.testRunner) { 11 if (window.testRunner) {
12 testRunner.setCanOpenWindows(); 12 testRunner.setCanOpenWindows();
13 testRunner.setCloseRemainingWindowsWhenComplete(true); 13 testRunner.setCloseRemainingWindowsWhenComplete(true);
14 } 14 }
15 15
16 var test = async_test("Testing sandbox inherited via target='_blank'"); 16 var test = async_test("Testing sandbox not inherited via target='_blank' when 'allow-unsandboxed-auxiliary' present");
17 17
18 window.addEventListener("message", test.step_func(function (e) { 18 window.addEventListener("message", test.step_func(function (e) {
19 assert_equals(document.origin, 'null'); 19 assert_equals(document.origin, 'null');
20 assert_equals(e.data.origin, 'null'); 20 assert_equals(e.data.origin, 'http://127.0.0.1:8000');
21 test.done(); 21 test.done();
22 })); 22 }));
23 23
24 test.step(function () { 24 test.step(function () {
25 var link = document.querySelector('a'); 25 var link = document.querySelector('a');
26 link.click(); 26 link.click();
27 }); 27 });
28 </script> 28 </script>
29 </body> 29 </body>
30 </html> 30 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/SandboxFlags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698