dom/tests/mochitest/bugs/test_bug817476.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=817476
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 817476</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 </head>
    12 <body>
    13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=817476">Mozilla Bug 817476</a>
    14 <p id="display"></p>
    15 <div id="content" style="display: none">
    17 </div>
    18 <pre id="test">
    19 <script type="application/javascript">
    21 /** Test for Bug 817476 **/
    22 function getNewWindow() {
    23   var ifr = document.createElement("iframe");
    24   $("content").appendChild(ifr);
    25   return ifr.contentWindow;
    26 }
    28 // Test getting .screen before .Screen
    29 var win = getNewWindow();
    30 is(Object.getPrototypeOf(win.screen), win.Screen.prototype,
    31    "protos must match (1)");
    32 is(win.Screen.prototype.toString(), "[object ScreenPrototype]",
    33    "proto must be WebIDL (1)");
    35 // Test getting Screen before .screen
    36 var win = getNewWindow();
    37 is(win.Screen.prototype, Object.getPrototypeOf(win.screen),
    38    "protos must match (2)");
    39 is(win.Screen.prototype.toString(), "[object ScreenPrototype]",
    40    "proto must be WebIDL (2)");
    42 </script>
    43 </pre>
    44 </body>
    45 </html>

mercurial