Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/webappapis/scripting/events/event-handler-onmove-02.tentative.html - WPT Dashboard Interop Dashboard
<!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>