layout/generic/test/test_bug382429.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=382429
     5 -->
     6 <head>
     7   <title>Test for Bug 382429</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 </head>
    11 <body>
    12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=382429">Mozilla Bug 382429</a>
    13 <p id="display">&#x05e2; 3/4</p>
    14 <div id="content" style="display: none">
    16 </div>
    17 <pre id="test">
    18 <script class="testbody" type="text/javascript">
    19  function do_Replace()
    20 {
    21 /** Test for Bug 382429 **/
    22   var t = $("display").firstChild;
    24   t.data = t.data.replace(/3\/4/, "3 \u05d3 4");
    25   ok(true, "We should get here without crash or hang");
    26   is(t.data, "\u05e2 3 \u05d3 4", "replace succeeded");
    27   SimpleTest.finish();
    28 }
    29   setTimeout(do_Replace, 500);
    30   SimpleTest.waitForExplicitFinish();
    31 </script>
    32 </pre>
    33 </body>
    34 </html>

mercurial