blob: a0168572c0b05f38503d7f9974632cd13b989b9c [file] [log] [blame]
<html>
<script src="../../resources/js-test.js"></script>
<script>
description("This test ensures window.innerWidth/innerHeight return the size of the visual viewport in CSS pixels.");
var originalWidth = window.innerWidth;
var originalHeight = window.innerHeight;
var scale = 2;
if (window.internals)
window.internals.setPageScaleFactor(scale);
shouldBe("window.innerWidth", "Math.floor(originalWidth / scale)");
shouldBe("window.innerHeight", "Math.floor(originalHeight / scale)");
</script>
</html>