dom/tests/mochitest/bugs/test_bug817476.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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