Bug 1880216 - Migrate Fenix docs into Sphinx. r=owlish,geckoview-reviewers,android...
[gecko.git] / dom / html / test / file_iframe_sandbox_k_if5.html
blob8deb65852f329795af82942c493c654f10d5022a
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>
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.");
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";
24 </script>
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'
30 <iframe id="if_6" src="about:blank" height="10" width="10"></iframe>
32 </body>
33 </html>