<!DOCTYPE HTML>
<html>
<head>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<style>
.bigbutton {
display:block;
width: 600px;
height: 600px;
}
</style>
</head>
<body style="width: 2000px">
<button class="bigbutton">One</button>
<button class="bigbutton">Two</button>
<button class="bigbutton">Three</button>
<script>
async_test((t) => {
window.scrollTo(0, 0);
assert_equals(window.pageXOffset, 0);
accessibilityController.addNotificationListener(t.step_func((target, notification) => {
if (target.role == 'AXRole: AXRootWebArea' && notification == 'MarkDirty') {
console.log('Got notification on web area');
accessibilityController.removeNotificationListener();
assert_equals(window.pageXOffset, 500);
t.done();
}
}));
window.scrollTo(500, 0);
}, "This test ensures that scrolling the window sends a notification.");
</script>
</body>
</html>