file_iframe_sandbox_a_if17.html (894B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Test for Bug 886262</title> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 7 </head> 8 9 <script> 10 function doTest() { 11 var if_18_19 = document.getElementById('if_18_19'); 12 if_18_19.sandbox = "allow-scripts allow-same-origin"; 13 if_18_19.contentWindow.postMessage("go", "*"); 14 } 15 </script> 16 17 <body onload="doTest()"> 18 I am sandboxed but with "allow-scripts". I change the sandbox flags on if_18_19 to 19 "allow-scripts allow-same-origin" then get it to re-navigate itself to 20 file_iframe_sandbox_a_if18.html, which attemps to call a function in my parent. 21 This should fail since my sandbox flags should be copied to it when the sandbox 22 flags are changed. 23 24 <iframe sandbox="allow-scripts" id="if_18_19" src="file_iframe_sandbox_a_if19.html" height="10" width="10"></iframe> 25 </body> 26 </html>