content/base/test/test_bug690056.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=690056
     5 -->
     6 <head>
     7   <title>Test for Bug 690056</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=690056">Mozilla Bug 690056</a>
    13 <p id="display">
    14   <iframe id="x"></iframe>
    15   <iframe style="display: none" id="y"></iframe>
    16 </p>
    17 <div id="content" style="display: none">
    19 </div>
    20 <pre id="test">
    21 <script type="application/javascript">
    23 /** Test for Bug 690056 **/
    24 SimpleTest.waitForExplicitFinish();
    25 is(document.hidden, false, "Document should not be hidden during load");
    26 is(document.visibilityState, "visible",
    27    "Document should be visible during load");
    29 addLoadEvent(function() {
    30   var doc = document.implementation.createDocument("", "", null);
    31   is(doc.hidden, true, "Data documents should be hidden");
    32   is(doc.visibilityState, "hidden", "Data documents really should be hidden");
    34   is(document.hidden, false, "Document should not be hidden onload");
    35   is(document.visibilityState, "visible",
    36      "Document should be visible onload");
    38   is($("x").contentDocument.hidden, false,
    39      "Subframe document should not be hidden onload");
    40   is($("x").contentDocument.visibilityState, "visible",
    41      "Subframe document should be visible onload");
    42   is($("y").contentDocument.hidden, false,
    43      "display:none subframe document should not be hidden onload");
    44   is($("y").contentDocument.visibilityState, "visible",
    45      "display:none subframe document should be visible onload");
    47   SimpleTest.finish();
    48 });
    51 </script>
    52 </pre>
    53 </body>
    54 </html>

mercurial