dom/tests/mochitest/bugs/test_bug465263.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=465263
     5 -->
     6 <head>
     7   <title>Test for Bug 465263</title>
     8   <script type="application/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=465263">Mozilla Bug 465263</a>
    13 <p id="display">
    14   <iframe src="http://mochi.test:8888"></iframe>
    15   <iframe src="http://mochi.test:8888"></iframe>
    16   <iframe src="http://mochi.test:8888"></iframe>
    17   <iframe src="http://mochi.test:8888"></iframe>
    18 </p>
    19 <div id="content" style="display: none">
    21 </div>
    22 <pre id="test">
    23 <script type="application/javascript">
    25 /** Test for Bug 465263 **/
    26 SimpleTest.waitForExplicitFinish();
    27 addLoadEvent(function() {
    28   window.frames[0].location.hash = '';
    29   is(window.frames[0].location.href, "http://mochi.test:8888/#",
    30      "Should have '#' in href now");
    31   window.frames[1].location.hash = '#';
    32   is(window.frames[1].location.href, "http://mochi.test:8888/#",
    33      "Should have only one '#' in href");
    34   window.frames[2].location.hash = 'foo';
    35   is(window.frames[2].location.href, "http://mochi.test:8888/#foo",
    36      "Should have '#foo' in href");
    37   window.frames[3].location.hash = '#foo';
    38   is(window.frames[3].location.href, "http://mochi.test:8888/#foo",
    39      "Should have only one '#' in href here too");
    40   SimpleTest.finish();
    41 });
    46 </script>
    47 </pre>
    48 </body>
    49 </html>

mercurial