37 lines
922 B
HTML
37 lines
922 B
HTML
<html>
|
|
<head>
|
|
<script>
|
|
function accessAttributes(s) {
|
|
var value = 0;
|
|
value = s.height;
|
|
value = s.width;
|
|
value = s.colorDepth;
|
|
value = s.pixelDepth;
|
|
value = s.availLeft;
|
|
value = s.availTop;
|
|
value = s.availHeight;
|
|
value = s.availWidth;
|
|
}
|
|
|
|
function runTests() {
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
var f = document.getElementById('theframe');
|
|
var s = f.contentWindow.screen;
|
|
accessAttributes(s);
|
|
|
|
// Now remove and check that we don't crash.
|
|
f.parentNode.removeChild(f);
|
|
accessAttributes(s);
|
|
}
|
|
</script>
|
|
</head>
|
|
<iframe id="theframe" src="resources/red.html"></iframe>
|
|
<body onload="runTests()">
|
|
<div>
|
|
This tests that accessing screen attributes doesn't crash even if containing frame is removed from the parent.
|
|
</div>
|
|
</body>
|
|
</html>
|