dom/tests/mochitest/bugs/test_bug927901.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=927901
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 927901</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11   <script type="application/javascript">
    13   /** Test for Bug 927901 **/
    14   SimpleTest.waitForExplicitFinish();
    16   var counter = 0;
    17   window.onmessage = function(e) {
    18     ++counter;
    19     is(e.data, "pass", "Accessing window.crypto.getRandomValues in the iframe should have succeeded!");
    20     if (counter == 1) {
    21       document.getElementById("testiframe").src =
    22         "http://mochi.test:8888/tests/dom/tests/mochitest/bugs/file_bug927901.html "
    23     } else if (counter == 2) {
    24       SimpleTest.finish();
    25     }
    26   }
    28   </script>
    29 </head>
    30 <body>
    31 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=927901">Mozilla Bug 927901</a>
    32 <p id="display"></p>
    33 <div id="content" style="display: none">
    35 </div>
    36 <pre id="test">
    37 </pre>
    38 <iframe id="testiframe" src="http://test1.example.org:8000/tests/dom/tests/mochitest/bugs/file_bug927901.html"></iframe>
    39 </body>
    40 </html>

mercurial