blob: 3f23eb28e6447cabc603e20fdd43db488a26d169 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 9999px;
height: 9999px;
}
</style>
<script src="../../../resources/js-test-pre.js"></script>
<script>
var scroller;
function runTest() {
description('Tests scrollTo/By(x,y) and scrollTo/By(scrollOptions) on the body in standard mode.');
scroller = document.body;
setTimeout(function() {
scroller.scrollTo(20, 500);
shouldBe("scroller.scrollLeft", "0");
shouldBe("scroller.scrollTop", "0");
shouldBe("window.scrollX", "0");
shouldBe("window.scrollY", "0");
scroller.scrollBy(50, 60);
shouldBe("scroller.scrollLeft", "0");
shouldBe("scroller.scrollTop", "0");
shouldBe("window.scrollX", "0");
shouldBe("window.scrollY", "0");
scroller.scrollTo({ 'left' : 100, 'top' : 400 });
shouldBe("scroller.scrollLeft", "0");
shouldBe("scroller.scrollTop", "0");
shouldBe("window.scrollX", "0");
shouldBe("window.scrollY", "0");
scroller.scrollTo(0, 0);
finishJSTest();
}, 0);
}
var jsTestIsAsync = true;
</script>
</head>
<body onload="runTest()">
<div>
</div>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>