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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/frames/sandboxed-iframe-navigation-top-by-name-denied.html

Issue 2379313002: Fix 'noopener' targeting and return value. (Closed)
Patch Set: Rebase Created 4 years, 2 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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 var test = async_test("Sandboxed frame cannot navigate top-level browsing co ntext by name."); 6 var test = async_test("Sandboxed frame cannot navigate top-level browsing co ntext by name.");
7 7
8 window.addEventListener("message", test.step_func(function (e) { 8 window.addEventListener("message", test.step_func(function (e) {
9 assert_equals(undefined, e.data["target"]); 9 assert_equals(null, e.data["target"]);
10 assert_equals(undefined, e.data["_top"]); 10 assert_equals(null, e.data["_top"]);
11 assert_equals(undefined, e.data["_parent"]); 11 assert_equals(null, e.data["_parent"]);
12 assert_equals(undefined, e.data["_blank"]); 12 assert_equals(null, e.data["_blank"]);
13 13
14 test.done(); 14 test.done();
15 })); 15 }));
16 </script> 16 </script>
17 </head> 17 </head>
18 <body> 18 <body>
19 <iframe sandbox="allow-scripts" 19 <iframe sandbox="allow-scripts"
20 srcdoc=" 20 srcdoc="
21 <script> 21 <script>
22 window.top.postMessage({ 22 window.top.postMessage({
23 'target': window.open('fail-and-notify-done.html', 'target'), 23 'target': window.open('fail-and-notify-done.html', 'target'),
24 '_top': window.open('fail-and-notify-done.html', '_top'), 24 '_top': window.open('fail-and-notify-done.html', '_top'),
25 '_parent': window.open('fail-and-notify-done.html', '_parent'), 25 '_parent': window.open('fail-and-notify-done.html', '_parent'),
26 '_blank': window.open('fail-and-notify-done.html', '_blank'), 26 '_blank': window.open('fail-and-notify-done.html', '_blank'),
27 }, '*'); 27 }, '*');
28 </script> 28 </script>
29 "> 29 ">
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698