content/base/test/test_bug431833.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
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 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=431833
     5 -->
     6 <head>
     7   <title>Test for Bug 431833</title>
     8   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    10   <script>
    11     var loadsComplete = [];
    12     function test(e) {
    13       loadsComplete[e.target.id] = true;
    14     }
    15     window.addEventListener('DOMFrameContentLoaded',test,true);
    16   </script>
    17 </head>
    18 <body>
    20 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=431833">Mozilla Bug 431833</a>
    21 <p id="display">
    22  <iframe id="f1" src="data:text/html,1"></iframe>
    23  <iframe id="f2" src="data:text/html,2"></iframe>
    24  <iframe id="f3" src="data:text/html,<iframe id='f4' src='data:text/html,3'></iframe>"></iframe>
    25 </p>
    26 <div id="content" style="display: none">
    28 </div>
    29 <pre id="test">
    30 <script class="testbody" type="text/javascript">
    32 /** Test for Bug 431833 **/
    34 SimpleTest.waitForExplicitFinish();
    36 addLoadEvent(function() {
    37     function check(id) {
    38       ok(loadsComplete[id], "DOMFrameContentLoaded didn't fire for " + id);
    39     }
    40     check("f1");
    41     check("f2");
    42     check("f3");
    43     check("f4");
    44   });
    46 addLoadEvent(SimpleTest.finish);
    47 </script>
    48 </pre>
    49 </body>
    50 </html>

mercurial