Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / base / test / test_bug690056.html
blobcfe483bfe1eebe438e8096303c7b225fe16401cb
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 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>