2011-10-11 14:29:12 -07:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=690056
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for Bug 690056</title>
|
|
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=690056">Mozilla Bug 690056</a>
|
|
|
|
<p id="display">
|
|
|
|
<iframe id="x"></iframe>
|
|
|
|
<iframe style="display: none" id="y"></iframe>
|
|
|
|
</p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script type="application/javascript">
|
|
|
|
|
|
|
|
/** Test for Bug 690056 **/
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2012-11-16 14:22:56 -08:00
|
|
|
is(document.hidden, false, "Document should not be hidden during load");
|
|
|
|
is(document.visibilityState, "visible",
|
2011-10-11 14:29:12 -07:00
|
|
|
"Document should be visible during load");
|
|
|
|
|
|
|
|
addLoadEvent(function() {
|
|
|
|
var doc = document.implementation.createDocument("", "", null);
|
2012-11-16 14:22:56 -08:00
|
|
|
is(doc.hidden, true, "Data documents should be hidden");
|
|
|
|
is(doc.visibilityState, "hidden", "Data documents really should be hidden");
|
2011-10-11 14:29:12 -07:00
|
|
|
|
2012-11-16 14:22:56 -08:00
|
|
|
is(document.hidden, false, "Document should not be hidden onload");
|
|
|
|
is(document.visibilityState, "visible",
|
2011-10-11 14:29:12 -07:00
|
|
|
"Document should be visible onload");
|
|
|
|
|
2012-11-16 14:22:56 -08:00
|
|
|
is($("x").contentDocument.hidden, false,
|
2011-10-11 14:29:12 -07:00
|
|
|
"Subframe document should not be hidden onload");
|
2012-11-16 14:22:56 -08:00
|
|
|
is($("x").contentDocument.visibilityState, "visible",
|
2011-10-11 14:29:12 -07:00
|
|
|
"Subframe document should be visible onload");
|
2012-11-16 14:22:56 -08:00
|
|
|
is($("y").contentDocument.hidden, false,
|
2011-10-11 14:29:12 -07:00
|
|
|
"display:none subframe document should not be hidden onload");
|
2012-11-16 14:22:56 -08:00
|
|
|
is($("y").contentDocument.visibilityState, "visible",
|
2011-10-11 14:29:12 -07:00
|
|
|
"display:none subframe document should be visible onload");
|
|
|
|
|
|
|
|
SimpleTest.finish();
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|