tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

sandbox_030.htm (1335B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4    <title>HTML5 Sandbox: Block parent content to access sandbox child iframe content when sandbox attribute exists</title>
      5    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      6    <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
      7    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-origin-browsing-context-flag" />
      8    <meta name="assert" content="Block parent content to access sandbox child iframe content when sandbox attribute exists" />
      9    <script src="/resources/testharness.js"></script>
     10    <script src="/resources/testharnessreport.js"></script>
     11 </head>
     12 <body>
     13    <script type="text/javascript">
     14 
     15     var t = async_test("Block parent content to access sandbox child iframe content when sandbox attribute exists");
     16 
     17    function callback(event)
     18    {
     19        t.step(function(){
     20            assert_true('sandbox' in document.createElement('iframe'));
     21            try { document.getElementById('sandboxIframe').contentDocument.title; assert_true(false);}
     22            catch(e) {assert_true(true);}
     23        });
     24        t.done();
     25    }
     26    </script>
     27    <div id=log></div>
     28 
     29    <iframe id='sandboxIframe' src="support/standalone-iframe-content.htm" sandbox onload="callback()" style="display : none"></iframe>
     30 </body>
     31 </html>