blob: fdd38c91c3e5946948eb86b0973f5c368a390924 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description(
'This test checks the scroll, client and offset dimension properties return "0" instead of undefined for an unrendered element. <div id="testDiv" style="display: none">x</div>'
);
var testDiv = document.getElementById("testDiv");
shouldBe("testDiv.offsetLeft", "0");
shouldBe("testDiv.offsetTop", "0");
shouldBe("testDiv.offsetWidth", "0");
shouldBe("testDiv.offsetHeight", "0");
shouldBe("testDiv.clientWidth", "0");
shouldBe("testDiv.clientHeight", "0");
shouldBe("testDiv.scrollLeft", "0");
shouldBe("testDiv.scrollTop", "0");
shouldBe("testDiv.scrollWidth", "0");
shouldBe("testDiv.scrollHeight", "0");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>