blob: db713fa365144f1a22a9b0804aaa56668fdd2d81 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 2000px;
}
</style>
<script src="../../../resources/js-test-pre.js"></script>
<script>
window.jsTestIsAsync = true;
function getUIScript()
{
return `
(function() {
uiController.didEndScrollingCallback = function() {
uiController.uiScriptComplete();
}
uiController.scrollToOffset(0, 500);
})();`
}
var receivedScrollEvent = false;
function scrolled()
{
receivedScrollEvent = true;
}
function runTest()
{
if (!testRunner.runUIScript)
return;
// Test default behavior (responsive).
if (testRunner.runUIScript) {
testRunner.runUIScript(getUIScript(), function() {
shouldBe('receivedScrollEvent', 'true');
finishJSTest();
});
}
}
window.addEventListener('load', runTest, false);
</script>
</head>
<body onscroll="scrolled()">
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>