Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<title>Window Object 'onmove'</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
promise_test(async t => {
const expectedRect = {'x': 100, 'y': 200};
const moved = new Promise(resolve => window.addEventListener("move", resolve));
await test_driver.set_window_rect(expectedRect);
await moved;
const rect = await test_driver.get_window_rect();
assert_equals(rect.x, expectedRect.x, "The window rect X is correct.");
assert_equals(rect.y, expectedRect.y, "The window rect Y is correct.");
}, "Window move event");
</script>