file_iframe_sandbox_open_window_pass.html (824B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Test for Bug 766282</title> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 7 </head> 8 9 <body onLoad="doStuff()"> 10 I should be opened by a sandboxed iframe via any method when "allow-popups" is specified. 11 </body> 12 </html> 13 14 <script> 15 function doStuff() { 16 // Check that the browsing context's (window's) name is as expected. 17 var expectedName = location.search.substring(1); 18 if (expectedName == window.name) { 19 window.opener.ok(true, "sandboxed documents should be able to open windows when \"allow-popups\" is specified"); 20 } else { 21 window.opener.ok(false, "window opened with \"allow-popups\", but expected name was " + expectedName + " and actual was " + window.name); 22 } 23 self.close(); 24 } 25 </script>