WebDriver based WPT for the 'onmove' handler

This CL defines a new WPT to verify the 'onmove' event handler is
triggered using the Set / Get Window Rect WebDriver command. This way
we ensure that the codepath that emits the event is executed, instead
of using the eventSender to emit a fake event.

Additionally, the CL implements the testdriver-vendor.js support for
these commands.

Bug: 1466855
Change-Id: Iabdd655c06af1eb5979a02a02b3a0fd978b2f6e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5201474
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Reviewed-by: Stefan Zager <szager@chromium.org>
Reviewed-by: Sonja Laurila <laurila@google.com>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251765}
diff --git a/html/webappapis/scripting/events/event-handler-onmove.html b/html/webappapis/scripting/events/event-handler-onmove-01.tentative.html
similarity index 100%
rename from html/webappapis/scripting/events/event-handler-onmove.html
rename to html/webappapis/scripting/events/event-handler-onmove-01.tentative.html
diff --git a/html/webappapis/scripting/events/event-handler-onmove-02.tentative.html b/html/webappapis/scripting/events/event-handler-onmove-02.tentative.html
new file mode 100644
index 0000000..a751f39
--- /dev/null
+++ b/html/webappapis/scripting/events/event-handler-onmove-02.tentative.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>Window Object 'onmove'</title>
+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/#handler-window-onmove">
+<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((t) => {
+  var expectedRect = {'x': 100, 'y': 200};
+  return new Promise(resolve => {
+      window.addEventListener("move", resolve);
+      test_driver.set_window_rect(expectedRect);
+  }).then(event => {
+      return test_driver.get_window_rect()
+          .then(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>