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

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

Issue 1583953005: Unsandboxed popups may also be navigated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Frame.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Security-Policy" content="sandbox allow-scripts al low-popups allow-popups-to-escape-sandbox">
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <script>
10 if (window.testRunner) {
11 testRunner.setCanOpenWindows();
12 testRunner.setCloseRemainingWindowsWhenComplete(true);
13 }
14
15 var test = async_test("Testing that popups opened when 'allow-popups-to- escape-sandbox' present can be navigated");
16
17 var current = 0;
18 var win = null;
19
20 window.addEventListener("message", test.step_func(function (e) {
21 assert_equals(document.origin, 'null');
22 if (current == 0) {
23 assert_equals(e.data.origin, 'http://127.0.0.1:8000');
24 current++;
25 win.location.replace('http://localhost:8000/security/resources/p ost-origin-to-opener.html');
26 } else {
27 assert_equals(e.data.origin, 'http://localhost:8000');
28 test.done();
29 }
30 }));
31
32 test.step(function () {
33 console.log("Opening a window!");
34 win = window.open('/security/resources/post-origin-to-opener.html', '_blank', '');
35 });
36 </script>
37 </body>
38 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Frame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698