file_iframe_sandbox_d_if22.html (778B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Test for Bug 838692</title> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 7 </head> 8 9 <script type="application/javascript"> 10 var testContext = "Test 21: navigate parent by name with window.open(): "; 11 12 function doTest() { 13 try { 14 window.open("file_iframe_sandbox_navigation_fail.html?" + escape(testContext), "if_parent2"); 15 window.parent.parent.postMessage({type: "attempted"}, "*"); 16 } catch(error) { 17 window.parent.parent.postMessage({ok: true, desc: testContext + "as expected, error thrown during window.open(..., \"if_parent2\")"}, "*"); 18 } 19 } 20 </script> 21 22 <body onload="doTest()"> 23 I am sandboxed with 'allow-same-origin allow-scripts' 24 </body> 25 </html>