content/html/content/test/file_iframe_sandbox_d_if18.html

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4   <meta charset="utf-8">
     5   <title>Test for Bug 838692</title>
     6   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     7   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     8 </head>
    10 <script type="application/javascript">
    11   window.addEventListener("message", receiveMessage, false);
    13   function receiveMessage(event) {
    14     window.parent.postMessage(event.data, "*");
    15   }
    17   var testContext = "Test 18: navigate child with window.open(): ";
    19   function doTest() {
    20     try {
    21       window.open("file_iframe_sandbox_navigation_pass.html?" + escape(testContext), "foo");
    22     } catch(error) {
    23       window.parent.postMessage({ok: false, desc: testContext + " error thrown during window.open(..., \"foo\")"}, "*");
    24     }
    25   }
    26 </script>
    28 <body onload="doTest()">
    29   I am sandboxed with 'allow-scripts'
    31   <iframe name="foo" height="10" width="10"></iframe>
    32 </body>
    33 </html>

mercurial