test_sandbox_and_document_uri.html (912B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Test sandbox inheritance and document uri handling</title> 6 <script src="/tests/SimpleTest/SimpleTest.js"></script> 7 <link rel="stylesheet" href="/tests/SimpleTest/test.css"/> 8 <script> 9 add_task(async function() { 10 await new Promise((resolve) => { 11 window.onmessage = (event) => { 12 is(event.data, "done"); 13 resolve(); 14 } 15 }); 16 }); 17 </script> 18 </head> 19 <body> 20 <p id="display"></p> 21 <div id="content" style="display: none"></div> 22 <pre id="test"></pre> 23 <iframe sandbox="allow-popups allow-scripts" srcdoc= 24 "<script> 25 window.onmessage = function(event) { parent.postMessage(event.data, '*'); } 26 /* Open a cross-origin page */ 27 window.onload = function() { window.open('http://example.org/tests/dom/base/test/file_sandbox_and_document_uri.html'); } 28 </script>" 29 ></iframe> 30 </body> 31 </html>