blob: a75c207bbe9ffda4163ab6e3568ba836a016bf82 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 2000px;
}
</style>
<script src="../../../resources/js-test-pre.js"></script>
<script>
window.jsTestIsAsync = true;
if (window.internals)
internals.eventThrottlingBehaviorOverride = 'responsive';
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>