| Index: LayoutTests/fast/frames/sandboxed-iframe-navigation-top-by-name-denied.html
|
| diff --git a/LayoutTests/fast/frames/sandboxed-iframe-navigation-top-by-name-denied.html b/LayoutTests/fast/frames/sandboxed-iframe-navigation-top-by-name-denied.html
|
| index 83a710a2df938bfc4d54f97d92efbf803a438bfb..c95f900a496e109fecdb2e3f5fd4a26ee22540af 100644
|
| --- a/LayoutTests/fast/frames/sandboxed-iframe-navigation-top-by-name-denied.html
|
| +++ b/LayoutTests/fast/frames/sandboxed-iframe-navigation-top-by-name-denied.html
|
| @@ -1,16 +1,31 @@
|
| <html>
|
| <head>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| <script>
|
| -if (window.testRunner)
|
| - testRunner.dumpAsText();
|
| -window.name = "target"
|
| + var test = async_test("Sandboxed frame cannot navigate top-level browsing context by name.");
|
| +
|
| + window.addEventListener("message", test.step_func(function (e) {
|
| + assert_equals(undefined, e.data["target"]);
|
| + assert_equals(undefined, e.data["_top"]);
|
| + assert_equals(undefined, e.data["_parent"]);
|
| + assert_equals(undefined, e.data["_blank"]);
|
| +
|
| + test.done();
|
| + }));
|
| </script>
|
| </head>
|
| <body>
|
| -<p>This test verifies that a sandboxed IFrame cannot navigate the top-level
|
| -frame without allow-top-navigation. This test passes if the navigation does
|
| -not occur.</p>
|
| <iframe sandbox="allow-scripts"
|
| - src="resources/navigate-top-by-name-to-fail.html">
|
| + srcdoc="
|
| +<script>
|
| + window.top.postMessage({
|
| + 'target': window.open('fail-and-notify-done.html', 'target'),
|
| + '_top': window.open('fail-and-notify-done.html', '_top'),
|
| + '_parent': window.open('fail-and-notify-done.html', '_parent'),
|
| + '_blank': window.open('fail-and-notify-done.html', '_blank'),
|
| + }, '*');
|
| +</script>
|
| + ">
|
| </body>
|
| </html>
|
|
|