<!DOCTYPE html>
<script src='../../../resources/testharness.js'></script>
<script src='../../../resources/testharnessreport.js'></script>
<script src='../../../resources/gesture-util.js'></script>
<style type="text/css">
body {
height: 2000px;
width: 2000px;
}
</style>
<script>
promise_test(async () => {
await smoothScrollWithXY(1, 1, 50, 50, GestureSourceType.MOUSE_INPUT, SPEED_INSTANT);
await waitFor( () => {
return Math.round(document.scrollingElement.scrollTop) == 1;
});
assert_equals(Math.round(document.scrollingElement.scrollTop), 1);
assert_equals(Math.round(document.scrollingElement.scrollLeft), 1);
await smoothScrollWithXY(2, 2, 50, 50, GestureSourceType.MOUSE_INPUT, SPEED_INSTANT);
await waitFor( () => {
return Math.round(document.scrollingElement.scrollTop) == 3;
});
assert_equals(Math.round(document.scrollingElement.scrollTop), 3);
assert_equals(Math.round(document.scrollingElement.scrollLeft), 3);
}, "Scrolling in a high dpi settings yeilds in the correct offset");
</script>