blob: 4df73db85c98d749182cfb2440dfa83a88661a83 [file] [log] [blame]
<html>
<head>
<script>
function print(message) {
var paragraph = document.createElement("p");
paragraph.appendChild(document.createTextNode(message));
document.getElementById("console").appendChild(paragraph);
}
function test() {
if (window.testRunner) {
testRunner.dumpAsText();
}
if (window === document.defaultView)
print("PASS: defaultView is the window object");
else
print("FAIL: defaultView is not the window object");
if (document.defaultView.document === document)
print("PASS: defaultView.document is the document object");
else
print("FAIL: defaultView.document is not the document object");
if (document.defaultView.getComputedStyle)
print("PASS: defaultView implements getComputedStyle");
else
print("FAIL: defaultView does not implement getComputedStyle");
if (document.defaultView.getMatchedCSSRules)
print("PASS: defaultView implements getMatchedCSSRules");
else
print("FAIL: defaultView does not implement getMatchedCSSRules");
}
</script>
</head>
<body onload="test();">
<p>This test checks that document.defaultView returns the window object, and that it implements
all the methods and properties it should.</p>
<p>If the test passes, you will see only PASS messages below.</p>
<hr>
<div id='console'/>
</body>
</html>