file_iframe_sandbox_k_if5.html (1163B)
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 <script type="text/javascript"> 10 function doStuff() { 11 // Check that sandboxed origin browsing context flag NOT set by attempting to access cookies. 12 try { 13 var foo = document.cookie; 14 window.opener.parent.ok_wrapper(true, "Sandboxed origin browsing context flag NOT set on new auxiliary browsing context."); 15 } catch(error) { 16 window.opener.parent.ok_wrapper(false, "Sandboxed origin browsing context flag set on new auxiliary browsing context."); 17 } 18 19 // Check that sandboxed top-level navigation browsing context flag NOT set. 20 // if_6 tries to navigate this document. 21 var if_6 = document.getElementById('if_6'); 22 if_6.src = "file_iframe_sandbox_k_if6.html"; 23 } 24 </script> 25 26 <body onLoad="doStuff()"> 27 I am not sandboxed directly, but opened from a sandboxed document with at least 28 'allow-scripts allow-popups allow-same-origin allow-top-navigation' 29 30 <iframe id="if_6" src="about:blank" height="10" width="10"></iframe> 31 32 </body> 33 </html>