test_bug690056.html (1697B)
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"> 18 19 </div> 20 <pre id="test"> 21 <script type="application/javascript"> 22 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"); 28 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"); 33 34 is(document.hidden, false, "Document should not be hidden onload"); 35 is(document.visibilityState, "visible", 36 "Document should be visible onload"); 37 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"); 46 47 SimpleTest.finish(); 48 }); 49 50 51 </script> 52 </pre> 53 </body> 54 </html>