Bug 1517332 [wpt PR 14694] - Change web platform test with mouse inputs under "pinterevents/", a=testonly
authorLan Wei <lanwei@chromium.org>
Thu, 31 Jan 2019 18:58:46 +0000
changeset 457048 0d9661173ae3ec28748a7a30c0a06c5835d7a886
parent 457047 b9986a3622e1aa3788d49b93dbc30cc53cee6bd4
child 457049 be75d768c965554a1f3ba86de00a80e0e3232ebd
push id111705
push userjames@hoppipolla.co.uk
push dateTue, 05 Feb 2019 18:07:20 +0000
treeherdermozilla-inbound@9592b19c9b09 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1517332, 14694, 606367, 1383330, 619697
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1517332 [wpt PR 14694] - Change web platform test with mouse inputs under "pinterevents/", a=testonly Automatic update from web-platform-tests Change web platform test with mouse inputs under "pinterevents/" Use test_driver Actions class in the web platform tests with mouse inputs in "pinterevents/" to simulate mouse inputs to make the tests pass on wpt serve. Bug: 606367 Change-Id: I2f00c3195fafb8bc600250631106cd9eabe79b90 Reviewed-on: https://chromium-review.googlesource.com/c/1383330 Commit-Queue: Lan Wei <lanwei@chromium.org> Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org> Cr-Commit-Position: refs/heads/master@{#619697} -- wpt-commits: f4c7d842e879b63c1f6d40726e49cb178404f34b wpt-pr: 14694
testing/web-platform/tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-manual.html
testing/web-platform/tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers.html
testing/web-platform/tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node-manual.html
testing/web-platform/tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node.html
testing/web-platform/tests/pointerevents/pointerevent_lostpointercapture_is_first-manual.html
testing/web-platform/tests/pointerevents/pointerevent_lostpointercapture_is_first.html
testing/web-platform/tests/pointerevents/pointerevent_pointerenter_does_not_bubble-manual.html
testing/web-platform/tests/pointerevents/pointerevent_pointerenter_does_not_bubble.html
testing/web-platform/tests/pointerevents/pointerevent_pointerleave_descendant_over-manual.html
testing/web-platform/tests/pointerevents/pointerevent_pointerleave_descendant_over.html
testing/web-platform/tests/pointerevents/pointerevent_pointerleave_descendants-manual.html
testing/web-platform/tests/pointerevents/pointerevent_pointerleave_descendants.html
testing/web-platform/tests/pointerevents/pointerevent_pointerleave_does_not_bubble-manual.html
testing/web-platform/tests/pointerevents/pointerevent_pointerleave_does_not_bubble.html
testing/web-platform/tests/pointerevents/pointerevent_pointerout_received_once-manual.html
testing/web-platform/tests/pointerevents/pointerevent_pointerout_received_once.html
testing/web-platform/tests/pointerevents/pointerevent_releasepointercapture_invalid_pointerid-manual.html
testing/web-platform/tests/pointerevents/pointerevent_releasepointercapture_invalid_pointerid.html
testing/web-platform/tests/pointerevents/pointerevent_releasepointercapture_onpointerup_mouse-manual.html
testing/web-platform/tests/pointerevents/pointerevent_releasepointercapture_onpointerup_mouse.html
testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_disconnected-manual.html
testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_disconnected.html
testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_invalid_pointerid-manual.html
testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_invalid_pointerid.html
testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_relatedtarget-manual.html
testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_relatedtarget.html
testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_click-manual.html
testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_click.html
testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse-manual.html
testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse.html
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-manual.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <title>Pointer Event: Boundary event sequence at implicit capture release</title>
-    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
-    <link rel="author" title="Google" href="http://www.google.com "/>
-    <meta name="assert" content="When a captured pointer is implicitly released after a click, the boundary events should follow the lostpointercapture event."/>
-    <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="pointerevent_support.js"></script>
-    <script type="text/javascript">
-      var detected_pointertypes = {};
-      var event_log = [];
-      var start_logging = false;
-
-      function resetTestState() {
-        detected_eventTypes = {};
-        event_log = [];
-        start_logging = false;
-      }
-
-      function run() {
-        var test_pointer_event = setup_pointerevent_test("Event sequence at implicit release on click", ["mouse"]);
-
-        var target = document.getElementById("target");
-        var capture_target = document.getElementById("capture-target");
-
-        All_Pointer_Events.forEach(function(eventName) {
-          on_event(target, eventName, function (event) {
-            detected_pointertypes[event.pointerType] = true;
-
-            if (event.type == "pointerdown") {
-              capture_target.setPointerCapture(event.pointerId);
-              start_logging = true;
-            } else if (start_logging) {
-              event_log.push(event.type + '@' + event.target.id);
-            }
-          });
-
-          on_event(capture_target, eventName, function (event) {
-            detected_pointertypes[event.pointerType] = true;
-            event_log.push(event.type + '@' + event.target.id);
-            if (event.type == 'lostpointercapture') {
-              setTimeout(function() {
-                test_pointer_event.step(function () {
-                  var expected_events = "pointerup, lostpointercapture, pointerout, pointerleave";
-                  assert_equals(event_log.join(", "), "pointerout@target, pointerleave@target, pointerover@capture-target, pointerenter@capture-target, gotpointercapture@capture-target, pointerup@capture-target, lostpointercapture@capture-target, pointerout@capture-target, pointerleave@capture-target, pointerover@target, pointerenter@target");
-                });
-                test_pointer_event.done();
-              }, 200);
-            }
-          });
-        });
-      }
-    </script>
-    <style>
-      #target {
-        margin: 20px;
-        background-color: black;
-      }
-    </style>
-  </head>
-  <body onload="run()">
-    <h1>Pointer Event: Boundary event sequence at implicit capture release</h1>
-    <h2 id="pointerTypeDescription"></h2>
-    <h4>
-      When a captured pointer is implicitly released after a click, the boundary events should follow the lostpointercapture event.
-    </h4>
-    <ol>
-      <li>Click on the black box with mouse and do not move the mouse after or during the click.</li>
-    </ol>
-    <div id="capture-target"></div>
-    <div id="target"></div>
-    <div id="complete-notice">
-      <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-      <p>The following events were logged: <span id="event-log"></span>.</p>
-    </div>
-    <div id="log"></div>
-  </body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers.html
@@ -0,0 +1,91 @@
+<!doctype html>
+<html>
+  <head>
+    <title>Pointer Event: Boundary event sequence at implicit capture release</title>
+    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
+    <link rel="author" title="Google" href="http://www.google.com "/>
+    <meta name="assert" content="When a captured pointer is implicitly released after a click, the boundary events should follow the lostpointercapture event."/>
+    <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <script src="/resources/testdriver.js"></script>
+    <script src="/resources/testdriver-actions.js"></script>
+    <script src="/resources/testdriver-vendor.js"></script>
+    <script type="text/javascript" src="pointerevent_support.js"></script>
+    <script type="text/javascript">
+      var detected_pointertypes = {};
+      var event_log = [];
+      var start_logging = false;
+
+      function resetTestState() {
+        detected_eventTypes = {};
+        event_log = [];
+        start_logging = false;
+      }
+
+      function run() {
+        var test_pointer_event = setup_pointerevent_test("Event sequence at implicit release on click", ["mouse"]);
+
+        var target = document.getElementById("target");
+        var capture_target = document.getElementById("capture-target");
+
+        All_Pointer_Events.forEach(function(eventName) {
+          on_event(target, eventName, function (event) {
+            detected_pointertypes[event.pointerType] = true;
+
+            if (event.type == "pointerdown") {
+              capture_target.setPointerCapture(event.pointerId);
+              start_logging = true;
+            } else if (start_logging) {
+              event_log.push(event.type + '@' + event.target.id);
+            }
+          });
+
+          on_event(capture_target, eventName, function (event) {
+            detected_pointertypes[event.pointerType] = true;
+            event_log.push(event.type + '@' + event.target.id);
+            if (event.type == 'lostpointercapture') {
+              step_timeout(function() {
+                test_pointer_event.step(function () {
+                  var expected_events = "pointerup, lostpointercapture, pointerout, pointerleave";
+                  assert_equals(event_log.join(", "), "pointerout@target, pointerleave@target, pointerover@capture-target, pointerenter@capture-target, gotpointercapture@capture-target, pointerup@capture-target, lostpointercapture@capture-target, pointerout@capture-target, pointerleave@capture-target, pointerover@target, pointerenter@target");
+                });
+                test_pointer_event.done();
+              }, 200);
+            }
+          });
+        });
+
+        // Inject mouse inputs.
+        new test_driver.Actions()
+          .pointerMove(0, 0, {origin: target})
+          .pointerDown()
+          .pointerUp()
+          .send();
+      }
+    </script>
+    <style>
+      #target {
+        margin: 20px;
+        background-color: black;
+      }
+    </style>
+  </head>
+  <body onload="run()">
+    <h1>Pointer Event: Boundary event sequence at implicit capture release</h1>
+    <h2 id="pointerTypeDescription"></h2>
+    <h4>
+      When a captured pointer is implicitly released after a click, the boundary events should follow the lostpointercapture event.
+    </h4>
+    <ol>
+      <li>Click on the black box with mouse and do not move the mouse after or during the click.</li>
+    </ol>
+    <div id="capture-target"></div>
+    <div id="target"></div>
+    <div id="complete-notice">
+      <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+      <p>The following events were logged: <span id="event-log"></span>.</p>
+    </div>
+    <div id="log"></div>
+  </body>
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node-manual.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>Lostpointercapture fires on document when target is removed</title>
-        <meta name="viewport" content="width=device-width">
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <script src="pointerevent_support.js"></script>
-    </head>
-    <body>
-        <h1>Pointer Events - lostpointercapture when capturing element is removed</h1>
-        <h4>
-            Test Description:
-            This test checks if lostpointercapture is fired at the document when the capturing node is removed from the document.
-            Complete the following actions:
-            <ol>
-                <li>Press and hold left mouse button over "Set Capture" button. "gotpointercapture" should be logged inside of the black rectangle.
-                <li>"lostpointercapture" should be logged inside of the black rectangle after a short delay.
-            </ol>
-        </h4>
-        <div id="target0"></div>
-        <div id="target1" style="background:black; color:white"></div>
-        <br>
-        <input type="button" id="btnCapture" value="Set Capture">
-        <script type='text/javascript'>
-            var isDisconnected = false;
-            var count = 0;
-            var event_log = [];
-
-            var detected_pointertypes = {};
-            add_completion_callback(end_of_test);
-            function end_of_test() {
-                showLoggedEvents();
-                showPointerTypes();
-            }
-
-            var target0 = document.getElementById('target0');
-            var target1 = document.getElementById('target1');
-            var captureButton = document.getElementById('btnCapture');
-
-            var test_lostpointercapture = async_test("lostpointercapture event received");
-
-            window.onload = function() {
-                on_event(captureButton, 'pointerdown', function(event) {
-                    detected_pointertypes[event.pointerType] = true;
-                    target0.setPointerCapture(event.pointerId);
-                });
-
-                on_event(target0, 'gotpointercapture', function(e) {
-                    event_log.push('gotpointercapture@target1');
-                    isDisconnected = true;
-                    target0.parentNode.removeChild(target0);
-                });
-
-                on_event(target0, 'lostpointercapture', function(e) {
-                    event_log.push('lostpointercapture@target0');
-                    test(function() {
-                        // TA: 11.3
-                        assert_unreached("lostpointercapture must be fired on the document, not the capturing element");
-                    }, "lostpointercapture must not be dispatched on the disconnected node");
-                });
-
-                on_event(document, 'lostpointercapture', function(e) {
-                    event_log.push('lostpointercapture@document');
-                    test(function() {
-                        // TA: 11.3
-                        assert_true(isDisconnected, "lostpointercapture must be fired on the document");
-                    }, "lostpointercapture is dispatched on the document");
-                    test_lostpointercapture.done();
-                });
-            }
-        </script>
-        <h1>Pointer Events Capture Test</h1>
-        <div id="complete-notice">
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-            <p>The following events were logged: <span id="event-log"></span>.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node.html
@@ -0,0 +1,94 @@
+<!doctype html>
+<html>
+    <head>
+        <title>Lostpointercapture fires on document when target is removed</title>
+        <meta name="viewport" content="width=device-width">
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <script src="pointerevent_support.js"></script>
+    </head>
+    <body>
+        <h1>Pointer Events - lostpointercapture when capturing element is removed</h1>
+        <h4>
+            Test Description:
+            This test checks if lostpointercapture is fired at the document when the capturing node is removed from the document.
+            Complete the following actions:
+            <ol>
+                <li>Press and hold left mouse button over "Set Capture" button. "gotpointercapture" should be logged inside of the black rectangle.
+                <li>"lostpointercapture" should be logged inside of the black rectangle after a short delay.
+            </ol>
+        </h4>
+        <div id="target0"></div>
+        <div id="target1" style="background:black; color:white"></div>
+        <br>
+        <input type="button" id="btnCapture" value="Set Capture">
+        <script type='text/javascript'>
+            var isDisconnected = false;
+            var count = 0;
+            var event_log = [];
+
+            var detected_pointertypes = {};
+            add_completion_callback(end_of_test);
+            function end_of_test() {
+                showLoggedEvents();
+                showPointerTypes();
+            }
+
+            var target0 = document.getElementById('target0');
+            var target1 = document.getElementById('target1');
+            var captureButton = document.getElementById('btnCapture');
+
+            var test_lostpointercapture = async_test("lostpointercapture event received");
+
+            window.onload = function() {
+                on_event(captureButton, 'pointerdown', function(event) {
+                    detected_pointertypes[event.pointerType] = true;
+                    target0.setPointerCapture(event.pointerId);
+                });
+
+                on_event(target0, 'gotpointercapture', function(e) {
+                    event_log.push('gotpointercapture@target1');
+                    isDisconnected = true;
+                    target0.parentNode.removeChild(target0);
+                });
+
+                on_event(target0, 'lostpointercapture', function(e) {
+                    event_log.push('lostpointercapture@target0');
+                    test(function() {
+                        // TA: 11.3
+                        assert_unreached("lostpointercapture must be fired on the document, not the capturing element");
+                    }, "lostpointercapture must not be dispatched on the disconnected node");
+                });
+
+                on_event(document, 'lostpointercapture', function(e) {
+                    event_log.push('lostpointercapture@document');
+                    test(function() {
+                        // TA: 11.3
+                        assert_true(isDisconnected, "lostpointercapture must be fired on the document");
+                    }, "lostpointercapture is dispatched on the document");
+                    test_lostpointercapture.done();
+                });
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: captureButton})
+                    .pointerDown()
+                    .pointerMove(2, 0, {origin: captureButton})
+                    .pointerMove(5, 0, {origin: captureButton})
+                    .pointerMove(8, 0, {origin: captureButton})
+                    .pointerMove(10, 0, {origin: captureButton})
+                    .send();
+            }
+        </script>
+        <h1>Pointer Events Capture Test</h1>
+        <div id="complete-notice">
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+            <p>The following events were logged: <span id="event-log"></span>.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_lostpointercapture_is_first-manual.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>Lostpointercapture triggers first and asynchronously</title>
-        <meta name="assert" content="TA5.2.10: A user agent must fire a pointer event named lostpointercapture after pointer capture is released for a pointer. This event must be fired prior to any subsequent events for the pointer after capture was released. This event is fired at the element from which pointer capture was removed;">
-        <meta name="viewport" content="width=device-width">
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <script src="pointerevent_support.js"></script>
-    </head>
-    <body onload="run()">
-        <h1>Pointer Events capture test - lostpointercapture order</h1>
-        <h4>
-            Test Description:
-            This test checks if lostpointercapture is handled asynchronously and prior to all subsequent events.
-            Complete the following actions:
-            <ol>
-                <li>Press and hold left mouse button over "Set Capture" button and move a little. "gotpointercapture" should be logged inside of the black rectangle
-                <li>"lostpointercapture" should be logged inside of the black rectangle after pointerup
-            </ol>
-        </h4>
-        Test passes if lostpointercapture is dispatched after releasing the mouse button and before any additional pointer events.
-        <div id="target0" style="background:black; color:white"></div>
-        <br>
-        <input type="button" id="btnCapture" value="Set Capture">
-        <script type='text/javascript'>
-            var detected_pointertypes = {};
-            var detected_pointerEvents = new Array();
-            var pointerdown_event = null;
-            var firstPointermoveReceived = false; // To handle the first pointermove right after gotpointercapture which gotpointercapture was sent right before it.
-            var firstPointeroverReceived = false; // To handle the first pointerover right after gotpointercapture which gotpointercapture was sent right before it.
-            var firstPointerenterReceived = false; // To handle the first pointeenter right after gotpointercapture which gotpointercapture was sent right before it.
-
-            var test_pointerEvent = async_test("lostpointercapture is dispatched prior to subsequent events"); // set up test harness
-
-            var isPointerCapture = false;
-            var count=0;
-
-            var testStarted = false;
-            var eventRcvd = false;
-            var isAsync = false;
-            var event_log = [];
-
-            add_completion_callback(end_of_test);
-            function end_of_test() {
-                showLoggedEvents();
-                showPointerTypes();
-            }
-
-            var target0 = document.getElementById('target0');
-            var captureButton = document.getElementById('btnCapture');
-
-            function run() {
-                on_event(captureButton, 'pointerdown', function(event) {
-                    detected_pointertypes[event.pointerType] = true;
-                    pointerdown_event = event;
-                    if(isPointerCapture == false) {
-                        isPointerCapture = true;
-                        captureButton.value = 'Release Capture';
-                        sPointerCapture(event);
-                    }
-                });
-
-                // TA5.1.3.1: Process Pending Pointer Capture
-                // Whenever a user agent is to fire a Pointer Event that is not gotpointercapture or lostpointercapture,
-                // it must first run the steps of processing pending pointer capture
-                //
-                // TA5.2.12: The lostpointercapture event
-                // After pointer capture is released for a pointer, and prior to any subsequent events for the pointer,
-                // the lostpointercapture event must be dispatched to the element from which pointer capture was removed.
-                // listen to all events
-                for (var i = 0; i < All_Pointer_Events.length; i++) {
-                    on_event(target0, All_Pointer_Events[i], function (event) {
-                        // if the event was gotpointercapture, just log it and return
-                        if (event.type == "gotpointercapture") {
-                            testStarted = true;
-                            rPointerCapture(event);
-                            isAsync = true;
-                            event_log.push('gotpointercapture@target0');
-                            return;
-                        }
-                        else if (event.type == "lostpointercapture") {
-                            event_log.push('lostpointercapture@target0');
-                            captureButton.value = 'Set Capture';
-                            isPointerCapture = false;
-
-                            // TA: 11.2
-                            test_pointerEvent.step(function () {
-                                assert_true(isAsync, "lostpointercapture must be fired asynchronously");
-                             });
-
-                            // if any events except pointerup have been received with same pointerId before lostpointercapture, then fail
-                            var eventsRcvd_str = "";
-                            if (eventRcvd) {
-                                eventsRcvd_str = "Events received before lostpointercapture: ";
-                                for (var i = 0; i < detected_pointerEvents.length; i++) {
-                                    eventsRcvd_str += detected_pointerEvents[i] + ", ";
-                                }
-                            }
-                            test_pointerEvent.step(function () {
-                                assert_false(eventRcvd, "no other events should be received before lostpointercapture." + eventsRcvd_str);
-                                assert_equals(event.pointerId, pointerdown_event.pointerId, "pointerID is same for pointerdown and lostpointercapture");
-                            });
-                            test_pointerEvent.done(); // complete test
-                        }
-                        else {
-                            if (testStarted && pointerdown_event != null && pointerdown_event.pointerId === event.pointerId) {
-                                if (event.type == "pointermove" && !firstPointermoveReceived) {
-                                  firstPointermoveReceived = true;
-                                }
-                                else if (event.type == "pointerenter" && !firstPointerenterReceived) {
-                                  firstPointerenterReceived = true;
-                                }
-                                else if (event.type == "pointerover" && !firstPointeroverReceived) {
-                                  firstPointeroverReceived = true;
-                                }
-                                else if (event.type != "pointerup") {
-                                    detected_pointerEvents.push(event.type);
-                                    eventRcvd = true;
-                                }
-                            }
-                        }
-                    });
-                }
-            }
-        </script>
-        <h1>Pointer Events Capture Test</h1>
-        <div id="complete-notice">
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-            <p>The following events were logged: <span id="event-log"></span>.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_lostpointercapture_is_first.html
@@ -0,0 +1,147 @@
+<!doctype html>
+<html>
+    <head>
+        <title>Lostpointercapture triggers first and asynchronously</title>
+        <meta name="assert" content="TA5.2.10: A user agent must fire a pointer event named lostpointercapture after pointer capture is released for a pointer. This event must be fired prior to any subsequent events for the pointer after capture was released. This event is fired at the element from which pointer capture was removed;">
+        <meta name="viewport" content="width=device-width">
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <script src="pointerevent_support.js"></script>
+    </head>
+    <body onload="run()">
+        <h1>Pointer Events capture test - lostpointercapture order</h1>
+        <h4>
+            Test Description:
+            This test checks if lostpointercapture is handled asynchronously and prior to all subsequent events.
+            Complete the following actions:
+            <ol>
+                <li>Press and hold left mouse button over "Set Capture" button and move a little. "gotpointercapture" should be logged inside of the black rectangle
+                <li>"lostpointercapture" should be logged inside of the black rectangle after pointerup
+            </ol>
+        </h4>
+        Test passes if lostpointercapture is dispatched after releasing the mouse button and before any additional pointer events.
+        <div id="target0" style="background:black; color:white"></div>
+        <br>
+        <input type="button" id="btnCapture" value="Set Capture">
+        <script type='text/javascript'>
+            var detected_pointertypes = {};
+            var detected_pointerEvents = new Array();
+            var pointerdown_event = null;
+            var firstPointermoveReceived = false; // To handle the first pointermove right after gotpointercapture which gotpointercapture was sent right before it.
+            var firstPointeroverReceived = false; // To handle the first pointerover right after gotpointercapture which gotpointercapture was sent right before it.
+            var firstPointerenterReceived = false; // To handle the first pointeenter right after gotpointercapture which gotpointercapture was sent right before it.
+
+            var test_pointerEvent = async_test("lostpointercapture is dispatched prior to subsequent events"); // set up test harness
+
+            var isPointerCapture = false;
+            var count=0;
+
+            var testStarted = false;
+            var eventRcvd = false;
+            var isAsync = false;
+            var event_log = [];
+
+            add_completion_callback(end_of_test);
+            function end_of_test() {
+                showLoggedEvents();
+                showPointerTypes();
+            }
+
+            var target0 = document.getElementById('target0');
+            var captureButton = document.getElementById('btnCapture');
+
+            function run() {
+                on_event(captureButton, 'pointerdown', function(event) {
+                    detected_pointertypes[event.pointerType] = true;
+                    pointerdown_event = event;
+                    if(isPointerCapture == false) {
+                        isPointerCapture = true;
+                        captureButton.value = 'Release Capture';
+                        sPointerCapture(event);
+                    }
+                });
+
+                // TA5.1.3.1: Process Pending Pointer Capture
+                // Whenever a user agent is to fire a Pointer Event that is not gotpointercapture or lostpointercapture,
+                // it must first run the steps of processing pending pointer capture
+                //
+                // TA5.2.12: The lostpointercapture event
+                // After pointer capture is released for a pointer, and prior to any subsequent events for the pointer,
+                // the lostpointercapture event must be dispatched to the element from which pointer capture was removed.
+                // listen to all events
+                for (var i = 0; i < All_Pointer_Events.length; i++) {
+                    on_event(target0, All_Pointer_Events[i], function (event) {
+                        // if the event was gotpointercapture, just log it and return
+                        if (event.type == "gotpointercapture") {
+                            testStarted = true;
+                            rPointerCapture(event);
+                            isAsync = true;
+                            event_log.push('gotpointercapture@target0');
+                            return;
+                        }
+                        else if (event.type == "lostpointercapture") {
+                            event_log.push('lostpointercapture@target0');
+                            captureButton.value = 'Set Capture';
+                            isPointerCapture = false;
+
+                            // TA: 11.2
+                            test_pointerEvent.step(function () {
+                                assert_true(isAsync, "lostpointercapture must be fired asynchronously");
+                             });
+
+                            // if any events except pointerup have been received with same pointerId before lostpointercapture, then fail
+                            var eventsRcvd_str = "";
+                            if (eventRcvd) {
+                                eventsRcvd_str = "Events received before lostpointercapture: ";
+                                for (var i = 0; i < detected_pointerEvents.length; i++) {
+                                    eventsRcvd_str += detected_pointerEvents[i] + ", ";
+                                }
+                            }
+                            test_pointerEvent.step(function () {
+                                assert_false(eventRcvd, "no other events should be received before lostpointercapture." + eventsRcvd_str);
+                                assert_equals(event.pointerId, pointerdown_event.pointerId, "pointerID is same for pointerdown and lostpointercapture");
+                            });
+                            test_pointerEvent.done(); // complete test
+                        }
+                        else {
+                            if (testStarted && pointerdown_event != null && pointerdown_event.pointerId === event.pointerId) {
+                                if (event.type == "pointermove" && !firstPointermoveReceived) {
+                                  firstPointermoveReceived = true;
+                                }
+                                else if (event.type == "pointerenter" && !firstPointerenterReceived) {
+                                  firstPointerenterReceived = true;
+                                }
+                                else if (event.type == "pointerover" && !firstPointeroverReceived) {
+                                  firstPointeroverReceived = true;
+                                }
+                                else if (event.type != "pointerup") {
+                                    detected_pointerEvents.push(event.type);
+                                    eventRcvd = true;
+                                }
+                            }
+                        }
+                    });
+                }
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: captureButton})
+                    .pointerDown()
+                    .pointerMove(2, 0, {origin: captureButton})
+                    .pointerMove(5, 0, {origin: captureButton})
+                    .pointerUp()
+                    .send();
+            }
+        </script>
+        <h1>Pointer Events Capture Test</h1>
+        <div id="complete-notice">
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+            <p>The following events were logged: <span id="event-log"></span>.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_pointerenter_does_not_bubble-manual.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>Pointer Event: The pointerenter event does not bubble </title>
-        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
-        <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
-        <meta name="assert" content="The pointerenter event must not bubble up to parent elements."/>
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <!-- /resources/testharness.js -->
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <!-- Additional helper script for common checks across event types -->
-        <script type="text/javascript" src="pointerevent_support.js"></script>
-        <script type="text/javascript">
-            var detected_pointertypes = {};
-            var test_pointerEvent = async_test("pointerEnter event does not bubble"); // set up test harness
-            // showPointerTypes is defined in pointerevent_support.js
-            // Requirements: the callback function will reference the test_pointerEvent object and
-            // will fail unless the async_test is created with the var name "test_pointerEvent".
-            add_completion_callback(showPointerTypes);
-
-            var pointerenter_event = null;
-
-            function run() {
-                var target0 = document.getElementById("target0");
-                var parent0 = document.getElementById("parent0");
-
-                on_event(target0, "pointerenter", function (event) {
-                    pointerenter_event = event;
-
-                    check_PointerEvent(event);
-                    test_pointerEvent.step(function () {
-                        assert_equals(event.type, "pointerenter", "pointer event received: " + event.type);
-                        assert_false(event.bubbles, "pointerenter event.bubbles should be false: " + event.bubbles);
-                    });
-                });
-                on_event(target0, "pointerout", function (event) {
-                    test_pointerEvent.step(function () {
-                        assert_not_equals(pointerenter_event, null, "pointerout event was never received: ");
-                    });
-                    test_pointerEvent.done(); // complete test
-                });
-
-                // parent
-                on_event(parent0, "pointerenter", function (event) {
-                    detected_pointertypes[event.pointerType] = true;
-                    test_pointerEvent.step(function () {
-                        assert_equals(event.target.id, "parent0", "Recieved " + event.type + " in parent for " + event.target.id);
-                    });
-                });
-            }
-
-        </script>
-        <style>
-            #target0 {
-            background: purple;
-            border: 1px solid orange;
-            width:50px;
-            height:50px;
-            }
-            #parent0 {
-            background: black;
-            border: 1px solid orange;
-            width:100px;
-            height:100px;
-            }
-        </style>
-    </head>
-    <body onload="run()">
-        <h1> Pointer Event: pointerenter does not bubble</h1>
-        <h4>
-            Test Description:
-            The pointerenter event must not bubble up to parent elements.
-        </h4>
-        <div id="instructions">
-            Use the mouse or pen to hover over then out of the purple box nested in the black box. Or with touch, tap on the purple box.
-        </div>
-        <div id="parent0">
-            <div id="target0"></div>
-        </div>
-        <div id="complete-notice">
-            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-            <p>Refresh the page to run the tests again with a different pointer type.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_pointerenter_does_not_bubble.html
@@ -0,0 +1,99 @@
+<!doctype html>
+<html>
+    <head>
+        <title>Pointer Event: The pointerenter event does not bubble </title>
+        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
+        <meta name="assert" content="The pointerenter event must not bubble up to parent elements."/>
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <!-- /resources/testharness.js -->
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <!-- Additional helper script for common checks across event types -->
+        <script type="text/javascript" src="pointerevent_support.js"></script>
+        <script type="text/javascript">
+            var detected_pointertypes = {};
+            var test_pointerEvent = async_test("pointerEnter event does not bubble"); // set up test harness
+            // showPointerTypes is defined in pointerevent_support.js
+            // Requirements: the callback function will reference the test_pointerEvent object and
+            // will fail unless the async_test is created with the var name "test_pointerEvent".
+            add_completion_callback(showPointerTypes);
+
+            var pointerenter_event = null;
+
+            function run() {
+                var target0 = document.getElementById("target0");
+                var parent0 = document.getElementById("parent0");
+
+                on_event(target0, "pointerenter", function (event) {
+                    pointerenter_event = event;
+
+                    check_PointerEvent(event);
+                    test_pointerEvent.step(function () {
+                        assert_equals(event.type, "pointerenter", "pointer event received: " + event.type);
+                        assert_false(event.bubbles, "pointerenter event.bubbles should be false: " + event.bubbles);
+                    });
+                });
+                on_event(target0, "pointerout", function (event) {
+                    test_pointerEvent.step(function () {
+                        assert_not_equals(pointerenter_event, null, "pointerout event was never received: ");
+                    });
+                    test_pointerEvent.done(); // complete test
+                });
+
+                // parent
+                on_event(parent0, "pointerenter", function (event) {
+                    detected_pointertypes[event.pointerType] = true;
+                    test_pointerEvent.step(function () {
+                        assert_equals(event.target.id, "parent0", "Recieved " + event.type + " in parent for " + event.target.id);
+                    });
+                });
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: target0})
+                    .pointerMove(-10, -10, {origin: target0})
+                    .pointerMove(-20, -20, {origin: target0})
+                    .pointerMove(0, 0)
+                    .send();
+            }
+
+        </script>
+        <style>
+            #target0 {
+            background: purple;
+            border: 1px solid orange;
+            width:50px;
+            height:50px;
+            }
+            #parent0 {
+            background: black;
+            border: 1px solid orange;
+            width:100px;
+            height:100px;
+            }
+        </style>
+    </head>
+    <body onload="run()">
+        <h1> Pointer Event: pointerenter does not bubble</h1>
+        <h4>
+            Test Description:
+            The pointerenter event must not bubble up to parent elements.
+        </h4>
+        <div id="instructions">
+            Use the mouse or pen to hover over then out of the purple box nested in the black box. Or with touch, tap on the purple box.
+        </div>
+        <div id="parent0">
+            <div id="target0"></div>
+        </div>
+        <div id="complete-notice">
+            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+            <p>Refresh the page to run the tests again with a different pointer type.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
\ No newline at end of file
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_pointerleave_descendant_over-manual.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>pointerleave + descendant</title>
-        <meta name="viewport" content="width=device-width">
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <script src="pointerevent_support.js"></script>
-    </head>
-    <body onload="run()">
-        <h1>pointerleave</h1>
-        <h4>
-            Test Description: This test checks if pointerleave event works properly.
-            <ol>
-                <li>Put your mouse over the black rectangle
-                <li>Then move it into the purple rectangle
-                <li>Click on the purple rectangle to complete the test
-            </ol>
-            Note: when you entered the black rectangle once don't leave it before the end of the test to get proper results.
-        </h4>
-        <p>
-        <div id="target0" style="background:black">
-            <div id="target1" style="background:purple"></div>
-        </div>
-        <script>
-            var eventTested = false;
-            var pointerleaveReceived = false;
-            var detected_pointertypes = {};
-
-            add_completion_callback(showPointerTypes);
-
-            function run() {
-                var target0 = document.getElementById("target0");
-
-                // The pointerleave event must not be dispatched when the pointer enters a child element without leaving the hit test boundaries of the parent. (as distinct from pointerout)
-                // TA: 9.2
-                on_event(target1, "pointerdown", function(event) {
-                    detected_pointertypes[event.pointerType] = true;
-
-                    test(function() {
-                        assert_true(!pointerleaveReceived, "pointerleave shouldn't be received on descendant's pointerover")
-                    }, "pointerleave shouldn't be received on descendant's pointerover");
-                });
-
-                on_event(target0, "pointerleave", function (event) {
-                    if (eventTested == false) {
-                        pointerleaveReceived = true;
-                        eventTested = true;
-                    }
-                });
-            }
-        </script>
-        <h1>Pointer Events pointerleave tests</h1>
-        <div id="complete-notice">
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-            <p>Refresh the page to run the tests again with a different pointer type.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_pointerleave_descendant_over.html
@@ -0,0 +1,72 @@
+<!doctype html>
+<html>
+    <head>
+        <title>pointerleave + descendant</title>
+        <meta name="viewport" content="width=device-width">
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <script src="pointerevent_support.js"></script>
+    </head>
+    <body onload="run()">
+        <h1>pointerleave</h1>
+        <h4>
+            Test Description: This test checks if pointerleave event works properly.
+            <ol>
+                <li>Put your mouse over the black rectangle
+                <li>Then move it into the purple rectangle
+                <li>Click on the purple rectangle to complete the test
+            </ol>
+            Note: when you entered the black rectangle once don't leave it before the end of the test to get proper results.
+        </h4>
+        <p>
+        <div id="target0" style="background:black">
+            <div id="target1" style="background:purple"></div>
+        </div>
+        <script>
+            var eventTested = false;
+            var pointerleaveReceived = false;
+            var detected_pointertypes = {};
+
+            add_completion_callback(showPointerTypes);
+
+            function run() {
+                var target0 = document.getElementById("target0");
+
+                // The pointerleave event must not be dispatched when the pointer enters a child element without leaving the hit test boundaries of the parent. (as distinct from pointerout)
+                // TA: 9.2
+                on_event(target1, "pointerdown", function(event) {
+                    detected_pointertypes[event.pointerType] = true;
+
+                    test(function() {
+                        assert_true(!pointerleaveReceived, "pointerleave shouldn't be received on descendant's pointerover")
+                    }, "pointerleave shouldn't be received on descendant's pointerover");
+                });
+
+                on_event(target0, "pointerleave", function (event) {
+                    if (eventTested == false) {
+                        pointerleaveReceived = true;
+                        eventTested = true;
+                    }
+                });
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: target0})
+                    .pointerMove(0, 0, {origin: target1})
+                    .pointerDown()
+                    .pointerUp()
+                    .send();
+            }
+        </script>
+        <h1>Pointer Events pointerleave tests</h1>
+        <div id="complete-notice">
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+            <p>Refresh the page to run the tests again with a different pointer type.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
\ No newline at end of file
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_pointerleave_descendants-manual.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>Pointerleave + descendant</title>
-        <meta name="viewport" content="width=device-width">
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <script src="pointerevent_support.js"></script>
-    </head>
-    <body onload="run()">
-        <h1>pointerleave</h1>
-        <h4>
-            Test Description: This test checks if pointerleave event works properly.
-            <p>Put your mouse over the black rectangle and then move it out through purple rectangle boundaries.</p>
-        </h4>
-        <p>
-        <div id="target0" style="background:black; height: 47px;">
-            <div style="background:purple; height: 35px; width: 90%; position: absolute"></div>
-        </div>
-        <script>
-            var eventTested = false;
-            var detected_pointertypes = {};
-
-            add_completion_callback(showPointerTypes);
-
-            function run() {
-                var target0 = document.getElementById("target0");
-                var test_pointerleave = async_test("pointerleave event received");
-
-                on_event(target0, "pointerover", function(event) {
-                    detected_pointertypes[ event.pointerType ] = true;
-                });
-
-                // When a pointing device is moved off of the hit test boundaries of an element and all of its descendants, the pointerleave event must be dispatched.
-                // TA: 9.1
-                on_event(target0, "pointerleave", function (event) {
-                    if (eventTested == false) {
-                        test_pointerleave.done();
-                        eventTested = true;
-                    }
-                });
-            }
-        </script>
-        <h1>Pointer Events pointerleave tests</h1>
-        <div id="complete-notice">
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-            <p>Refresh the page to run the tests again with a different pointer type.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_pointerleave_descendants.html
@@ -0,0 +1,63 @@
+<!doctype html>
+<html>
+    <head>
+        <title>Pointerleave + descendant</title>
+        <meta name="viewport" content="width=device-width">
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <script src="pointerevent_support.js"></script>
+    </head>
+    <body onload="run()">
+        <h1>pointerleave</h1>
+        <h4>
+            Test Description: This test checks if pointerleave event works properly.
+            <p>Put your mouse over the black rectangle and then move it out through purple rectangle boundaries.</p>
+        </h4>
+        <p>
+        <div id="target0" style="background:black; height: 47px;">
+            <div style="background:purple; height: 35px; width: 90%; position: absolute"></div>
+        </div>
+        <script>
+            var eventTested = false;
+            var detected_pointertypes = {};
+
+            add_completion_callback(showPointerTypes);
+
+            function run() {
+                var target0 = document.getElementById("target0");
+                var target1 = document.querySelector("#target0 > div");
+                var test_pointerleave = async_test("pointerleave event received");
+
+                on_event(target0, "pointerover", function(event) {
+                    detected_pointertypes[ event.pointerType ] = true;
+                });
+
+                // When a pointing device is moved off of the hit test boundaries of an element and all of its descendants, the pointerleave event must be dispatched.
+                // TA: 9.1
+                on_event(target0, "pointerleave", function (event) {
+                    if (eventTested == false) {
+                        test_pointerleave.done();
+                        eventTested = true;
+                    }
+                });
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: target0})
+                    .pointerMove(0, 0, {origin: target1})
+                    .pointerMove(0, 0)
+                    .send();
+            }
+        </script>
+        <h1>Pointer Events pointerleave tests</h1>
+        <div id="complete-notice">
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+            <p>Refresh the page to run the tests again with a different pointer type.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
\ No newline at end of file
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_pointerleave_does_not_bubble-manual.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>Pointer Event: The pointerleave event does not bubble </title>
-        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
-        <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
-        <meta name="assert" content="The pointerleave event must not bubble up to parent elements."/>
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <!-- /resources/testharness.js -->
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <!-- Additional helper script for common checks across event types -->
-        <script type="text/javascript" src="pointerevent_support.js"></script>
-        <script type="text/javascript">
-            var detected_pointertypes = {};
-            var test_pointerEvent = async_test("pointerLeave event does not bubble"); // set up test harness
-            // showPointerTypes is defined in pointerevent_support.js
-            // Requirements: the callback function will reference the test_pointerEvent object and
-            // will fail unless the async_test is created with the var name "test_pointerEvent".
-            add_completion_callback(showPointerTypes);
-
-            function run() {
-                var target0 = document.getElementById("target0");
-                var parent0 = document.getElementById("parent0");
-
-                on_event(target0, "pointerleave", function (event) {
-                    detected_pointertypes[event.pointerType] = true;
-                    check_PointerEvent(event);
-                    test_pointerEvent.step(function () {
-                        assert_equals(event.type, "pointerleave", "pointer event received: " + event.type);
-                        assert_false(event.bubbles, "pointerleave event.bubbles should be false: " + event.bubbles);
-                    });
-                });
-
-                on_event(parent0, "pointerleave", function (event) {
-                    test_pointerEvent.step(function () {
-                        assert_equals(event.target.id, "parent0", "Recieved " + event.type + " in parent for " + event.target.id);
-                    });
-                    test_pointerEvent.done(); // complete test
-                });
-            }
-        </script>
-        <style>
-            #target0 {
-            background: purple;
-            border: 1px solid orange;
-            width:50px;
-            height:50px;
-            }
-            #parent0 {
-            background: black;
-            border: 1px solid orange;
-            width:100px;
-            height:100px;
-            }
-        </style>
-    </head>
-    <body onload="run()">
-        <h1> Pointer Event: pointerleave does not bubble</h1>
-        <h4>
-            Test Description:
-            The pointerleave event must not bubble up to parent elements.
-        </h4>
-        <div id="instructions">
-            Use the mouse or pen to hover over then out of the purple box nested in the black box. Or with touch, tap on the purple box.
-        </div>
-        <div id="parent0">
-            <div id="target0"></div>
-        </div>
-        <div id="complete-notice">
-            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-            <p>Refresh the page to run the tests again with a different pointer type.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_pointerleave_does_not_bubble.html
@@ -0,0 +1,86 @@
+<!doctype html>
+<html>
+    <head>
+        <title>Pointer Event: The pointerleave event does not bubble </title>
+        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
+        <meta name="assert" content="The pointerleave event must not bubble up to parent elements."/>
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <!-- /resources/testharness.js -->
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <!-- Additional helper script for common checks across event types -->
+        <script type="text/javascript" src="pointerevent_support.js"></script>
+        <script type="text/javascript">
+            var detected_pointertypes = {};
+            var test_pointerEvent = async_test("pointerLeave event does not bubble"); // set up test harness
+            // showPointerTypes is defined in pointerevent_support.js
+            // Requirements: the callback function will reference the test_pointerEvent object and
+            // will fail unless the async_test is created with the var name "test_pointerEvent".
+            add_completion_callback(showPointerTypes);
+
+            function run() {
+                var target0 = document.getElementById("target0");
+                var parent0 = document.getElementById("parent0");
+
+                on_event(target0, "pointerleave", function (event) {
+                    detected_pointertypes[event.pointerType] = true;
+                    check_PointerEvent(event);
+                    test_pointerEvent.step(function () {
+                        assert_equals(event.type, "pointerleave", "pointer event received: " + event.type);
+                        assert_false(event.bubbles, "pointerleave event.bubbles should be false: " + event.bubbles);
+                    });
+                });
+
+                on_event(parent0, "pointerleave", function (event) {
+                    test_pointerEvent.step(function () {
+                        assert_equals(event.target.id, "parent0", "Recieved " + event.type + " in parent for " + event.target.id);
+                    });
+                    test_pointerEvent.done(); // complete test
+                });
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: target0})
+                    .pointerMove(0, 0)
+                    .send();
+            }
+        </script>
+        <style>
+            #target0 {
+            background: purple;
+            border: 1px solid orange;
+            width:50px;
+            height:50px;
+            }
+            #parent0 {
+            background: black;
+            border: 1px solid orange;
+            width:100px;
+            height:100px;
+            }
+        </style>
+    </head>
+    <body onload="run()">
+        <h1> Pointer Event: pointerleave does not bubble</h1>
+        <h4>
+            Test Description:
+            The pointerleave event must not bubble up to parent elements.
+        </h4>
+        <div id="instructions">
+            Use the mouse or pen to hover over then out of the purple box nested in the black box. Or with touch, tap on the purple box.
+        </div>
+        <div id="parent0">
+            <div id="target0"></div>
+        </div>
+        <div id="complete-notice">
+            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+            <p>Refresh the page to run the tests again with a different pointer type.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
\ No newline at end of file
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_pointerout_received_once-manual.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>pointerout received just once</title>
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <meta name="viewport" content="width=device-width">
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <script src="pointerevent_support.js"></script>
-    </head>
-    <body onload="run()">
-        <h1>pointerout received just once</h1>
-        <h4>
-            Test Description: This test checks if pointerout event dispatched properly.
-            <ol>
-                <li>Put your mouse over the black rectangle.
-                <li>Move your mouse out of the black rectangle
-            </ol>
-        </h4>
-        <p>
-        <div id="target0" style="background:black"></div>
-        <script>
-            var pointeroutCounter = 0;
-            var detected_pointertypes = {};
-
-            setup({ explicit_done: true });
-            add_completion_callback(showPointerTypes);
-
-            function run() {
-                var target0 = document.getElementById("target0");
-
-                // When a mouse passes through dispatches one event
-                // TA: 7.4
-                on_event(target0, "pointerover", function (event) {
-                    pointeroutCounter = 0;
-                    detected_pointertypes[event.pointerType] = true;
-                });
-
-                on_event(target0, "pointerout", function (event) {
-                    pointeroutCounter++;
-
-                    setTimeout(function() {
-                        test(function() {
-                            assert_true(pointeroutCounter == 1, "pointerout received just once")
-                        }, "pointerout received just once");
-                        done();
-                    }, 5000);
-                });
-            }
-        </script>
-        <h1>Pointer Events pointerout received once test</h1>
-        <div id="complete-notice">
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-            <p>Refresh the page to run the tests again with a different pointer type.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_pointerout_received_once.html
@@ -0,0 +1,67 @@
+<!doctype html>
+<html>
+    <head>
+        <title>pointerout received just once</title>
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <meta name="viewport" content="width=device-width">
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <script src="pointerevent_support.js"></script>
+    </head>
+    <body onload="run()">
+        <h1>pointerout received just once</h1>
+        <h4>
+            Test Description: This test checks if pointerout event dispatched properly.
+            <ol>
+                <li>Put your mouse over the black rectangle.
+                <li>Move your mouse out of the black rectangle
+            </ol>
+        </h4>
+        <p>
+        <div id="target0" style="background:black"></div>
+        <script>
+            var pointeroutCounter = 0;
+            var detected_pointertypes = {};
+
+            setup({ explicit_done: true });
+            add_completion_callback(showPointerTypes);
+
+            function run() {
+                var target0 = document.getElementById("target0");
+
+                // When a mouse passes through dispatches one event
+                // TA: 7.4
+                on_event(target0, "pointerover", function (event) {
+                    pointeroutCounter = 0;
+                    detected_pointertypes[event.pointerType] = true;
+                });
+
+                on_event(target0, "pointerout", function (event) {
+                    pointeroutCounter++;
+
+                    step_timeout(function() {
+                        test(function() {
+                            assert_true(pointeroutCounter == 1, "pointerout received just once")
+                        }, "pointerout received just once");
+                        done();
+                    }, 5000);
+                });
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: target0})
+                    .pointerMove(0, 0)
+                    .send();
+            }
+        </script>
+        <h1>Pointer Events pointerout received once test</h1>
+        <div id="complete-notice">
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+            <p>Refresh the page to run the tests again with a different pointer type.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
\ No newline at end of file
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_releasepointercapture_invalid_pointerid-manual.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>Pointer Event: releasePointerCapture DOMException - NotFoundError</title>
-        <meta name="assert" content="releasePointerCapture DOMException - NotFoundError"/>
-        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
-        <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
-        <link rel="help" href="http://www.w3.org/wiki/PointerEvents/TestAssertions">
-        <meta name="assert" content="When the releasePointerCapture method is invoked, if the provided pointerId value does not match any of the active pointers, a DOMException with the name NotFoundError must be thrown."/>
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <!-- /resources/testharness.js -->
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <!-- Additional helper script for common checks across event types -->
-        <script type="text/javascript" src="pointerevent_support.js"></script>
-        <script type="text/javascript">
-            var detected_pointertypes = {};
-            var test_pointerEvent = async_test("releasePointerCapture: DOMException NotFoundError"); // set up test harness
-            // showPointerTypes is defined in pointerevent_support.js
-            // Requirements: the callback function will reference the test_pointerEvent object and
-            // will fail unless the async_test is created with the var name "test_pointerEvent".
-            add_completion_callback(showPointerTypes);
-
-            var INVALID_POINTERID = 314159265358973923;
-
-            function run() {
-                var target0 = document.getElementById("target0");
-                target0.style["touchAction"] = "none";
-                var listener = document.getElementById("listener");
-
-                // try to release pointer capture with an invalid id
-                on_event(listener, "pointermove", function (event) {
-                    detected_pointertypes[event.pointerType] = true;
-
-                    test_pointerEvent.step(function() {
-                      assert_throws("NotFoundError", function(){ listener.releasePointerCapture(INVALID_POINTERID); },
-                                    "It should not be possible to release capture an invalid pointer id");
-                    });
-
-                    test_pointerEvent.done(); // complete test
-                });
-
-                // set pointer capture
-                on_event(target0, "pointerdown", function (event) {
-                    detected_pointertypes[event.pointerType] = true;
-                    listener.setPointerCapture(event.pointerId);
-                });
-            }
-        </script>
-    </head>
-    <body onload="run()">
-        <div id="listener"></div>
-        <h1> Pointer Event: releasePointerCapture() DOMException - NotFoundError</h1>
-        <h4>
-            Test Description:
-            Upon invocation of the releasePointerCapture method, if the provided pointerId value does not match any of the
-            active pointers, a DOMException with the name NotFoundError must be thrown.
-        </h4>
-        <br />
-        <div id="target0">
-            Use the mouse, touch or pen to move over or contact this box.
-        </div>
-        <div id="complete-notice">
-            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-            <p>Refresh the page to run the tests again with a different pointer type.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_releasepointercapture_invalid_pointerid.html
@@ -0,0 +1,81 @@
+<!doctype html>
+<html>
+    <head>
+        <title>Pointer Event: releasePointerCapture DOMException - NotFoundError</title>
+        <meta name="assert" content="releasePointerCapture DOMException - NotFoundError"/>
+        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
+        <link rel="help" href="http://www.w3.org/wiki/PointerEvents/TestAssertions">
+        <meta name="assert" content="When the releasePointerCapture method is invoked, if the provided pointerId value does not match any of the active pointers, a DOMException with the name NotFoundError must be thrown."/>
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <!-- /resources/testharness.js -->
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <!-- Additional helper script for common checks across event types -->
+        <script type="text/javascript" src="pointerevent_support.js"></script>
+        <script type="text/javascript">
+            var detected_pointertypes = {};
+            var test_pointerEvent = async_test("releasePointerCapture: DOMException NotFoundError"); // set up test harness
+            // showPointerTypes is defined in pointerevent_support.js
+            // Requirements: the callback function will reference the test_pointerEvent object and
+            // will fail unless the async_test is created with the var name "test_pointerEvent".
+            add_completion_callback(showPointerTypes);
+
+            var INVALID_POINTERID = 314159265358973923;
+
+            function run() {
+                var target0 = document.getElementById("target0");
+                target0.style["touchAction"] = "none";
+                var listener = document.getElementById("listener");
+
+                // try to release pointer capture with an invalid id
+                on_event(listener, "pointermove", function (event) {
+                    detected_pointertypes[event.pointerType] = true;
+
+                    test_pointerEvent.step(function() {
+                      assert_throws("NotFoundError", function(){ listener.releasePointerCapture(INVALID_POINTERID); },
+                                    "It should not be possible to release capture an invalid pointer id");
+                    });
+
+                    test_pointerEvent.done(); // complete test
+                });
+
+                // set pointer capture
+                on_event(target0, "pointerdown", function (event) {
+                    detected_pointertypes[event.pointerType] = true;
+                    listener.setPointerCapture(event.pointerId);
+                });
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: target0})
+                    .pointerDown()
+                    .pointerMove(10, 0, {origin: target0})
+                    .pointerUp()
+                    .send();
+            }
+        </script>
+    </head>
+    <body onload="run()">
+        <div id="listener"></div>
+        <h1> Pointer Event: releasePointerCapture() DOMException - NotFoundError</h1>
+        <h4>
+            Test Description:
+            Upon invocation of the releasePointerCapture method, if the provided pointerId value does not match any of the
+            active pointers, a DOMException with the name NotFoundError must be thrown.
+        </h4>
+        <br />
+        <div id="target0">
+            Use the mouse, touch or pen to move over or contact this box.
+        </div>
+        <div id="complete-notice">
+            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+            <p>Refresh the page to run the tests again with a different pointer type.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_releasepointercapture_onpointerup_mouse-manual.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>Release capture on pointerup</title>
-        <meta name="viewport" content="width=device-width">
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <script src="pointerevent_support.js"></script>
-    </head>
-    <body>
-        <h1>Pointer Events Capture Test - release capture on pointerup</h1>
-        <h4>
-            Test Description: This test checks if setCapture/releaseCapture functions works properly. Complete the following actions:
-            <ol>
-                <li> Press and hold left mouse button over "Set Capture" button
-                <li> Release left mouse button anywhere over the document. "lostpointercapture" should be logged inside of the black rectangle immediately after "pointerup"
-            </ol>
-        </h4>
-        Test passes if the proper behavior of the events is observed.
-        <div id="target0" style="background:black; color:white"></div>
-        <br>
-        <input type="button" id="btnCapture" value="Set Capture">
-        <script type='text/javascript'>
-            var isPointerCapture = false;
-            var pointerupGot = false;
-            var count=0;
-            var event_log = [];
-
-            var detected_pointertypes = {};
-            add_completion_callback(end_of_test);
-            function end_of_test() {
-                showLoggedEvents();
-                showPointerTypes();
-            }
-
-            var target0 = document.getElementById('target0');
-            var captureButton = document.getElementById('btnCapture');
-
-            setup({ explicit_done: true });
-
-            window.onload = function() {
-                on_event(captureButton, 'pointerdown', function(e) {
-                    detected_pointertypes[e.pointerType] = true;
-                    if(isPointerCapture == false) {
-                        isPointerCapture = true;
-                        sPointerCapture(e);
-                        pointerupGot = false;
-                    }
-                });
-
-                on_event(target0, 'gotpointercapture', function(e) {
-                    event_log.push('gotpointercapture@target0');
-                });
-
-                // If the setPointerCapture method has been invoked on the pointer specified by pointerId,
-                // and the releasePointerCapture method has not been invoked,a lostpointercapture event must be
-                // dispatched to the element on which the setPointerCapture method was invoked. Furthermore, 
-                // subsequent events for the specified pointer must follow normal hit testing mechanisms for
-                // determining the event target.
-                // TA: 3.7
-                on_event(target0, 'lostpointercapture', function(e) {
-                    test(function() {
-                        assert_true(pointerupGot, "pointerup was received before lostpointercapture")
-                    }, "pointerup was received before lostpointercapture");
-                    event_log.push('lostpointercapture@target0');
-                    isPointerCapture = false;
-                    done();
-                });
-
-                on_event(target0, 'pointerup', function(e) {
-                    event_log.push('pointerup@target0');
-                    pointerupGot = true;
-                });
-            }
-        </script>
-        <h1>Pointer Events Capture Test</h1>
-        <div id="complete-notice">
-            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-            <p>The following events were logged: <span id="event-log"></span>.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_releasepointercapture_onpointerup_mouse.html
@@ -0,0 +1,96 @@
+<!doctype html>
+<html>
+    <head>
+        <title>Release capture on pointerup</title>
+        <meta name="viewport" content="width=device-width">
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <script src="pointerevent_support.js"></script>
+    </head>
+    <body>
+        <h1>Pointer Events Capture Test - release capture on pointerup</h1>
+        <h4>
+            Test Description: This test checks if setCapture/releaseCapture functions works properly. Complete the following actions:
+            <ol>
+                <li> Press and hold left mouse button over "Set Capture" button
+                <li> Release left mouse button anywhere over the document. "lostpointercapture" should be logged inside of the black rectangle immediately after "pointerup"
+            </ol>
+        </h4>
+        Test passes if the proper behavior of the events is observed.
+        <div id="target0" style="background:black; color:white"></div>
+        <br>
+        <input type="button" id="btnCapture" value="Set Capture">
+        <script type='text/javascript'>
+            var isPointerCapture = false;
+            var pointerupGot = false;
+            var count=0;
+            var event_log = [];
+
+            var detected_pointertypes = {};
+            add_completion_callback(end_of_test);
+            function end_of_test() {
+                showLoggedEvents();
+                showPointerTypes();
+            }
+
+            var target0 = document.getElementById('target0');
+            var captureButton = document.getElementById('btnCapture');
+
+            setup({ explicit_done: true });
+
+            window.onload = function() {
+                on_event(captureButton, 'pointerdown', function(e) {
+                    detected_pointertypes[e.pointerType] = true;
+                    if(isPointerCapture == false) {
+                        isPointerCapture = true;
+                        sPointerCapture(e);
+                        pointerupGot = false;
+                    }
+                });
+
+                on_event(target0, 'gotpointercapture', function(e) {
+                    event_log.push('gotpointercapture@target0');
+                });
+
+                // If the setPointerCapture method has been invoked on the pointer specified by pointerId,
+                // and the releasePointerCapture method has not been invoked,a lostpointercapture event must be
+                // dispatched to the element on which the setPointerCapture method was invoked. Furthermore, 
+                // subsequent events for the specified pointer must follow normal hit testing mechanisms for
+                // determining the event target.
+                // TA: 3.7
+                on_event(target0, 'lostpointercapture', function(e) {
+                    test(function() {
+                        assert_true(pointerupGot, "pointerup was received before lostpointercapture")
+                    }, "pointerup was received before lostpointercapture");
+                    event_log.push('lostpointercapture@target0');
+                    isPointerCapture = false;
+                    done();
+                });
+
+                on_event(target0, 'pointerup', function(e) {
+                    event_log.push('pointerup@target0');
+                    pointerupGot = true;
+                });
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: captureButton})
+                    .pointerDown()
+                    .pointerMove(10, 0, {origin: target0})
+                    .pointerUp()
+                    .send();
+            }
+        </script>
+        <h1>Pointer Events Capture Test</h1>
+        <div id="complete-notice">
+            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+            <p>The following events were logged: <span id="event-log"></span>.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_disconnected-manual.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>setPointerCapture() throws on disconnected node</title>
-        <meta name="viewport" content="width=device-width">
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <script src="pointerevent_support.js"></script>
-        <script type="text/javascript">
-            var detected_pointertypes = {};
-            add_completion_callback(showPointerTypes);
-            var test_setPointerCapture = async_test("setPointerCapture: DOMException InvalidStateError");
-
-            function run() {
-                var target0 = document.getElementById("target0");
-                var target1 = document.getElementById("target1");
-
-                target1.parentNode.removeChild(target1);
-
-                on_event(target0, "pointerdown", function (event) {
-                    detected_pointertypes[ event.pointerType ] = true;
-                    try {
-                        target1.setPointerCapture(event.pointerId);
-
-                        test_setPointerCapture.step(function() {
-                            assert_unreached("DOMException: InvalidStateError should have been thrown.");
-                        });
-                    } catch (e) {
-                        // TA: 13.4
-                        test_setPointerCapture.step(function() {
-                            assert_equals(e.name, "InvalidStateError", "DOMException should be InvalidStateError");
-                        });
-                    }
-                    test_setPointerCapture.done();
-                });
-            }
-        </script>
-    </head>
-    <body onload="run()">
-        <h1>Pointer Event: DOMException InvalidStateError</h1>
-        <h4>Test Description:
-            When the setPointerCapture method is invoked, if the target node does not participate in its ownerDocument's tree, a DOMException with the name InvalidStateError must be thrown.
-        </h4>
-        <br>
-        <div id="target0">
-            Use the mouse, touch or pen to contact this box.
-        </div>
-        <div id="target1"></div>
-        <div id="complete-notice">
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_disconnected.html
@@ -0,0 +1,65 @@
+<!doctype html>
+<html>
+    <head>
+        <title>setPointerCapture() throws on disconnected node</title>
+        <meta name="viewport" content="width=device-width">
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <script src="pointerevent_support.js"></script>
+        <script type="text/javascript">
+            var detected_pointertypes = {};
+            add_completion_callback(showPointerTypes);
+            var test_setPointerCapture = async_test("setPointerCapture: DOMException InvalidStateError");
+
+            function run() {
+                var target0 = document.getElementById("target0");
+                var target1 = document.getElementById("target1");
+
+                target1.parentNode.removeChild(target1);
+
+                on_event(target0, "pointerdown", function (event) {
+                    detected_pointertypes[ event.pointerType ] = true;
+                    try {
+                        target1.setPointerCapture(event.pointerId);
+
+                        test_setPointerCapture.step(function() {
+                            assert_unreached("DOMException: InvalidStateError should have been thrown.");
+                        });
+                    } catch (e) {
+                        // TA: 13.4
+                        test_setPointerCapture.step(function() {
+                            assert_equals(e.name, "InvalidStateError", "DOMException should be InvalidStateError");
+                        });
+                    }
+                    test_setPointerCapture.done();
+                });
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: target0})
+                    .pointerDown()
+                    .pointerUp()
+                    .send();
+            }
+        </script>
+    </head>
+    <body onload="run()">
+        <h1>Pointer Event: DOMException InvalidStateError</h1>
+        <h4>Test Description:
+            When the setPointerCapture method is invoked, if the target node does not participate in its ownerDocument's tree, a DOMException with the name InvalidStateError must be thrown.
+        </h4>
+        <br>
+        <div id="target0">
+            Use the mouse, touch or pen to contact this box.
+        </div>
+        <div id="target1"></div>
+        <div id="complete-notice">
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_invalid_pointerid-manual.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>Pointer Event: gotPointercapture is fired first.</title>
-        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
-        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
-        <link rel="help" href="http://www.w3.org/wiki/PointerEvents/TestAssertions">
-        <meta name="assert" content="When the setPointerCapture method is invoked, if the provided pointerId value does not match any of the active pointers, a DOMException with the name NotFountError must be thrown." />
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <!-- /resources/testharness.js -->
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <!-- Additional helper script for common checks across event types -->
-        <script type="text/javascript" src="pointerevent_support.js"></script>
-        <script type="text/javascript">
-            var detected_pointertypes = {};
-            var test_pointerEvent = async_test("setPointerCapture: DOMException NotFoundError"); // set up test harness
-            // showPointerTypes is defined in pointerevent_support.js
-            // Requirements: the callback function will reference the test_pointerEvent object and
-            // will fail unless the async_test is created with the var name "test_pointerEvent".
-            add_completion_callback(showPointerTypes);
-
-            var INVALID_POINTERID = -39548;
-
-            function run() {
-                var target0 = document.getElementById("target0");
-                target0.style["touchAction"] = "none";
-                var listener = document.getElementById("complete-notice");
-
-                on_event(target0, "pointerdown", function (event) {
-                    detected_pointertypes[event.pointerType] = true;
-                    test_pointerEvent.step(function() {
-                      assert_throws("NotFoundError", function(){ listener.setPointerCapture(INVALID_POINTERID); },
-                                    "It should not be possible to capture an invalid pointer id");
-                    });
-                    test_pointerEvent.done(); // complete test
-                });
-            }
-        </script>
-    </head>
-    <body onload="run()">
-        <h1>Pointer Event: DOMException NotFoundError</h1>
-        <h4>Test Description:
-            When the setPointerCapture method is invoked, if the provided pointerId value does not match any of the active pointers, a DOMException with the name NotFoundError must be thrown.
-        </h4>
-        <br />
-        <div id="target0">
-            Use the mouse, touch or pen to contact this box.
-        </div>
-        <div id="complete-notice">
-            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-            <p>Refresh the page to run the tests again with a different pointer type.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_invalid_pointerid.html
@@ -0,0 +1,67 @@
+<!doctype html>
+<html>
+    <head>
+        <title>Pointer Event: gotPointercapture is fired first.</title>
+        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/wiki/PointerEvents/TestAssertions">
+        <meta name="assert" content="When the setPointerCapture method is invoked, if the provided pointerId value does not match any of the active pointers, a DOMException with the name NotFountError must be thrown." />
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <!-- /resources/testharness.js -->
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <!-- Additional helper script for common checks across event types -->
+        <script type="text/javascript" src="pointerevent_support.js"></script>
+        <script type="text/javascript">
+            var detected_pointertypes = {};
+            var test_pointerEvent = async_test("setPointerCapture: DOMException NotFoundError"); // set up test harness
+            // showPointerTypes is defined in pointerevent_support.js
+            // Requirements: the callback function will reference the test_pointerEvent object and
+            // will fail unless the async_test is created with the var name "test_pointerEvent".
+            add_completion_callback(showPointerTypes);
+
+            var INVALID_POINTERID = -39548;
+
+            function run() {
+                var target0 = document.getElementById("target0");
+                target0.style["touchAction"] = "none";
+                var listener = document.getElementById("complete-notice");
+
+                on_event(target0, "pointerdown", function (event) {
+                    detected_pointertypes[event.pointerType] = true;
+                    test_pointerEvent.step(function() {
+                      assert_throws("NotFoundError", function(){ listener.setPointerCapture(INVALID_POINTERID); },
+                                    "It should not be possible to capture an invalid pointer id");
+                    });
+                    test_pointerEvent.done(); // complete test
+                });
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: target0})
+                    .pointerDown()
+                    .pointerUp()
+                    .send();
+            }
+        </script>
+    </head>
+    <body onload="run()">
+        <h1>Pointer Event: DOMException NotFoundError</h1>
+        <h4>Test Description:
+            When the setPointerCapture method is invoked, if the provided pointerId value does not match any of the active pointers, a DOMException with the name NotFoundError must be thrown.
+        </h4>
+        <br />
+        <div id="target0">
+            Use the mouse, touch or pen to contact this box.
+        </div>
+        <div id="complete-notice">
+            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+            <p>Refresh the page to run the tests again with a different pointer type.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_relatedtarget-manual.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<!doctype html>
-<html>
-    <head>
-        <title>Set/Release capture + relatedTarget</title>
-        <meta name="viewport" content="width=device-width">
-        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-        <script src="/resources/testharness.js"></script>
-        <script src="/resources/testharnessreport.js"></script>
-        <script src="pointerevent_support.js"></script>
-    </head>
-    <body>
-        <h1>Pointer Events Capture Test - capture and relatedTarget</h1>
-        <h4>
-            Test Description: This test checks if setCapture/releaseCapture functions works properly. Complete the following actions:
-            <ol>
-                <li> Put your mouse over the purple rectangle. pointerover should be received for the purple rectangle
-                <li> Press and hold left mouse button over "Set Capture" button
-                <li> Move your mouse. pointerover should be received for the black rectangle
-                <li> Release left mouse button to complete the test.
-            </ol>
-        </h4>
-        Test passes if the proper behavior of the events is observed.
-
-        <div id="target0" style="background:black; color:white"></div>
-        <br>
-        <div id="target1" style="background:purple; color:white"></div>
-        <br>
-        <input type="button" id="btnCapture" value="Set Capture">
-        <script type='text/javascript'>
-            var isPointerCapture = false;
-            var isPointeroverGot = false;
-            var count=0;
-            var event_log = [];
-
-            var detected_pointertypes = {};
-            add_completion_callback(end_of_test);
-            function end_of_test() {
-                showLoggedEvents();
-                showPointerTypes();
-            }
-
-            var target0 = document.getElementById('target0');
-            var target1 = document.getElementById('target1');
-            var captureButton = document.getElementById('btnCapture');
-
-            setup({ explicit_done: true });
-
-            window.onload = function() {
-                on_event(captureButton, 'pointerdown', function(e) {
-                    if(isPointerCapture == false) {
-                        isPointerCapture = true;
-                        sPointerCapture(e);
-                    }
-                    else {
-                        isPointerCapture = false;
-                        rPointerCapture(e);
-                    }
-                });
-
-                on_event(target0, 'gotpointercapture', function(e) {
-                    event_log.push('gotpointercapture@target0');
-                });
-
-                on_event(target0, 'lostpointercapture', function(e) {
-                    event_log.push('lostpointercapture@target0');
-                    isPointerCapture = false;
-                });
-
-                run();
-            }
-
-            function run() {
-                // After invoking the setPointerCapture method on an element, subsequent pointer events for the specified pointer must be targeted at that element
-                // and boundary events should be sent accordingly and relatedTarget should behave normally.
-                on_event(target0, "pointerover", function (event) {
-                    event_log.push('pointerover@target0');
-                    if(isPointerCapture && isPointeroverGot) {
-                        test(function() {
-                            assert_not_equals(event.relatedTarget, null, "relatedTarget should not be null even when the capture is set")
-                        }, "relatedTarget should not be null even when the capture is set.");
-                        done();
-                    }
-                });
-
-                on_event(target1, "pointerover", function (event) {
-                    detected_pointertypes[ event.pointerType ] = true;
-                    if(!isPointeroverGot) {
-                        test(function() {
-                            assert_true(isPointerCapture==false, "pointerover shouldn't trigger for this target when capture is enabled");
-                        }, "pointerover shouldn't trigger for the purple rectangle while the black rectangle has capture");
-                        isPointeroverGot = true;
-                        event_log.push('pointerover@target1');
-                    }
-                });
-            }
-        </script>
-        <h1>Pointer Events Capture Test</h1>
-        <div id="complete-notice">
-            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
-            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-            <p>The following events were logged: <span id="event-log"></span>.</p>
-            <p>Refresh the page to run the tests again with a different pointer type.</p>
-        </div>
-        <div id="log"></div>
-    </body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_setpointercapture_relatedtarget.html
@@ -0,0 +1,119 @@
+<!doctype html>
+<html>
+    <head>
+        <title>Set/Release capture + relatedTarget</title>
+        <meta name="viewport" content="width=device-width">
+        <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script src="/resources/testdriver.js"></script>
+        <script src="/resources/testdriver-actions.js"></script>
+        <script src="/resources/testdriver-vendor.js"></script>
+        <script src="pointerevent_support.js"></script>
+    </head>
+    <body>
+        <h1>Pointer Events Capture Test - capture and relatedTarget</h1>
+        <h4>
+            Test Description: This test checks if setCapture/releaseCapture functions works properly. Complete the following actions:
+            <ol>
+                <li> Put your mouse over the purple rectangle. pointerover should be received for the purple rectangle
+                <li> Press and hold left mouse button over "Set Capture" button
+                <li> Move your mouse. pointerover should be received for the black rectangle
+                <li> Release left mouse button to complete the test.
+            </ol>
+        </h4>
+        Test passes if the proper behavior of the events is observed.
+
+        <div id="target0" style="background:black; color:white"></div>
+        <br>
+        <div id="target1" style="background:purple; color:white"></div>
+        <br>
+        <input type="button" id="btnCapture" value="Set Capture">
+        <script type='text/javascript'>
+            var isPointerCapture = false;
+            var isPointeroverGot = false;
+            var count=0;
+            var event_log = [];
+
+            var detected_pointertypes = {};
+            add_completion_callback(end_of_test);
+            function end_of_test() {
+                showLoggedEvents();
+                showPointerTypes();
+            }
+
+            var target0 = document.getElementById('target0');
+            var target1 = document.getElementById('target1');
+            var captureButton = document.getElementById('btnCapture');
+
+            setup({ explicit_done: true });
+
+            window.onload = function() {
+                on_event(captureButton, 'pointerdown', function(e) {
+                    if(isPointerCapture == false) {
+                        isPointerCapture = true;
+                        sPointerCapture(e);
+                    }
+                    else {
+                        isPointerCapture = false;
+                        rPointerCapture(e);
+                    }
+                });
+
+                on_event(target0, 'gotpointercapture', function(e) {
+                    event_log.push('gotpointercapture@target0');
+                });
+
+                on_event(target0, 'lostpointercapture', function(e) {
+                    event_log.push('lostpointercapture@target0');
+                    isPointerCapture = false;
+                });
+
+                run();
+            }
+
+            function run() {
+                // After invoking the setPointerCapture method on an element, subsequent pointer events for the specified pointer must be targeted at that element
+                // and boundary events should be sent accordingly and relatedTarget should behave normally.
+                on_event(target0, "pointerover", function (event) {
+                    event_log.push('pointerover@target0');
+                    if(isPointerCapture && isPointeroverGot) {
+                        test(function() {
+                            assert_not_equals(event.relatedTarget, null, "relatedTarget should not be null even when the capture is set")
+                        }, "relatedTarget should not be null even when the capture is set.");
+                        done();
+                    }
+                });
+
+                on_event(target1, "pointerover", function (event) {
+                    detected_pointertypes[ event.pointerType ] = true;
+                    if(!isPointeroverGot) {
+                        test(function() {
+                            assert_true(isPointerCapture==false, "pointerover shouldn't trigger for this target when capture is enabled");
+                        }, "pointerover shouldn't trigger for the purple rectangle while the black rectangle has capture");
+                        isPointeroverGot = true;
+                        event_log.push('pointerover@target1');
+                    }
+                });
+
+                // Inject mouse inputs.
+                new test_driver.Actions()
+                    .pointerMove(0, 0, {origin: target1})
+                    .pointerMove(0, 0, {origin: captureButton})
+                    .pointerDown()
+                    .pointerMove(0, 0, {origin: target1})
+                    .pointerMove(0, 0, {origin: target0})
+                    .pointerUp()
+                    .send();
+            }
+        </script>
+        <h1>Pointer Events Capture Test</h1>
+        <div id="complete-notice">
+            <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
+            <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+            <p>The following events were logged: <span id="event-log"></span>.</p>
+            <p>Refresh the page to run the tests again with a different pointer type.</p>
+        </div>
+        <div id="log"></div>
+    </body>
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_click-manual.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <title>Pointer Event: Suppress compatibility mouse events on click</title>
-    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
-    <link rel="author" title="Google" href="http://www.google.com "/>
-    <meta name="assert" content="When a pointerdown is canceled, a click/tap shouldn't fire any compatibility mouse events."/>
-    <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="pointerevent_support.js"></script>
-    <script type="text/javascript">
-      var test_pointerEvent = async_test("Suppress compat mouse events on click");
-      add_completion_callback(end_of_test);
-
-      var detected_pointertypes = {};
-      var event_log = [];
-
-      function end_of_test() {
-          showLoggedEvents();
-          showPointerTypes();
-      }
-
-      function end_of_interaction() {
-          test(function () {
-              assert_equals(event_log.join(", "),
-                  "mousedown@target1, mouseup@target1");
-          }, "Event log");
-
-          test_pointerEvent.done(); // complete test
-      }
-
-      function run() {
-          on_event(document.getElementById("done"), "click", end_of_interaction);
-
-          var target_list = ["target0", "target1"];
-          var pointer_event_list = ["pointerdown"];
-          var mouse_event_list = ["mousedown", "mouseup"];
-
-          target_list.forEach(function(targetId) {
-              var target = document.getElementById(targetId);
-
-              pointer_event_list.forEach(function(eventName) {
-                  on_event(target, eventName, function (event) {
-                      detected_pointertypes[event.pointerType] = true;
-                      var label = event.type + "@" + targetId;
-
-                      test(function () {
-                          assert_true(event.isPrimary);
-                      }, "primary pointer " + label);
-
-                      if (label === "pointerdown@target0")
-                          event.preventDefault();
-                  });
-              });
-
-              mouse_event_list.forEach(function(eventName) {
-                  on_event(target, eventName, function (event) {
-                      event_log.push(event.type + "@" + targetId);
-                  });
-              });
-          });
-      }
-    </script>
-    <style>
-      #target0, #target1 {
-        margin: 20px;
-      }
-
-      #done {
-        margin: 20px;
-        border: 2px solid black;
-      }
-    </style>
-  </head>
-  <body onload="run()">
-    <h1>Pointer Event: Suppress compatibility mouse events on click</h1>
-    <h4>
-      When a pointerdown is canceled, a click/tap shouldn't fire any compatibility mouse events.
-    </h4>
-    <ol>
-      <li> Click or tap on Target0.</li>
-      <li> Click or tap on Target1.</li>
-      <li> Click Done.</li>
-    </ol>
-    <div id="target0">
-      Target0
-    </div>
-    <div id="target1">
-      Target1
-    </div>
-    <div id="done">
-      Done
-    </div>
-    <div id="complete-notice">
-      <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-      <p>The following events were logged: <span id="event-log"></span>.</p>
-    </div>
-    <div id="log"></div>
-  </body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_click.html
@@ -0,0 +1,120 @@
+<!doctype html>
+<html>
+  <head>
+    <title>Pointer Event: Suppress compatibility mouse events on click</title>
+    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
+    <link rel="author" title="Google" href="http://www.google.com "/>
+    <meta name="assert" content="When a pointerdown is canceled, a click/tap shouldn't fire any compatibility mouse events."/>
+    <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <script src="/resources/testdriver.js"></script>
+    <script src="/resources/testdriver-actions.js"></script>
+    <script src="/resources/testdriver-vendor.js"></script>
+    <script type="text/javascript" src="pointerevent_support.js"></script>
+    <script type="text/javascript">
+      var test_pointerEvent = async_test("Suppress compat mouse events on click");
+      add_completion_callback(end_of_test);
+
+      var detected_pointertypes = {};
+      var event_log = [];
+
+      function end_of_test() {
+          showLoggedEvents();
+          showPointerTypes();
+      }
+
+      function end_of_interaction() {
+          test(function () {
+              assert_equals(event_log.join(", "),
+                  "mousedown@target1, mouseup@target1");
+          }, "Event log");
+
+          test_pointerEvent.done(); // complete test
+      }
+
+      function run() {
+          on_event(document.getElementById("done"), "click", end_of_interaction);
+
+          var target_list = ["target0", "target1"];
+          var pointer_event_list = ["pointerdown"];
+          var mouse_event_list = ["mousedown", "mouseup"];
+
+          target_list.forEach(function(targetId) {
+              var target = document.getElementById(targetId);
+
+              pointer_event_list.forEach(function(eventName) {
+                  on_event(target, eventName, function (event) {
+                      detected_pointertypes[event.pointerType] = true;
+                      var label = event.type + "@" + targetId;
+
+                      test(function () {
+                          assert_true(event.isPrimary);
+                      }, "primary pointer " + label);
+
+                      if (label === "pointerdown@target0")
+                          event.preventDefault();
+                  });
+              });
+
+              mouse_event_list.forEach(function(eventName) {
+                  on_event(target, eventName, function (event) {
+                      event_log.push(event.type + "@" + targetId);
+                  });
+              });
+          });
+
+          // Inject mouse inputs.
+          var target0 = document.getElementById('target0');
+          var target1 = document.getElementById('target1');
+          var targetDone = document.getElementById('done');
+          new test_driver.Actions()
+              .pointerMove(0, 0, {origin: target0})
+              .pointerDown()
+              .pointerUp()
+              .pointerMove(0, 0, {origin: target1})
+              .pointerDown()
+              .pointerUp()
+              .pointerMove(0, 0, {origin: targetDone})
+              .pointerDown()
+              .pointerUp()
+              .send();
+      }
+    </script>
+    <style>
+      #target0, #target1 {
+        margin: 20px;
+      }
+
+      #done {
+        margin: 20px;
+        border: 2px solid black;
+      }
+    </style>
+  </head>
+  <body onload="run()">
+    <h1>Pointer Event: Suppress compatibility mouse events on click</h1>
+    <h4>
+      When a pointerdown is canceled, a click/tap shouldn't fire any compatibility mouse events.
+    </h4>
+    <ol>
+      <li> Click or tap on Target0.</li>
+      <li> Click or tap on Target1.</li>
+      <li> Click Done.</li>
+    </ol>
+    <div id="target0">
+      Target0
+    </div>
+    <div id="target1">
+      Target1
+    </div>
+    <div id="done">
+      Done
+    </div>
+    <div id="complete-notice">
+      <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+      <p>The following events were logged: <span id="event-log"></span>.</p>
+    </div>
+    <div id="log"></div>
+  </body>
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse-manual.html
+++ /dev/null
@@ -1,124 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <title>Pointer Event: Suppress compatibility mouse events on drag</title>
-    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
-    <link rel="author" title="Google" href="http://www.google.com "/>
-    <meta name="assert" content="When a pointerdown is canceled, a mouse drag shouldn't fire any compatibility mouse events."/>
-    <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="pointerevent_support.js"></script>
-    <script type="text/javascript">
-      var test_pointerEvent = async_test("Suppress compat mouse events on drag");
-      add_completion_callback(end_of_test);
-
-      var detected_pointertypes = {};
-      var event_log = [];
-
-      function end_of_test() {
-          showLoggedEvents();
-          showPointerTypes();
-      }
-
-      var include_next_mousemove = false;
-
-      // Limits logging/testing of mousemove.
-      function drop_event(event_type) {
-          return (event_type == "mousemove" && !include_next_mousemove);
-      }
-
-      function end_of_interaction() {
-          test(function () {
-              assert_equals(event_log.join(", "),
-                  "mousedown@target1, mousemove@target1, mouseup@target1");
-          }, "Event log");
-
-          test_pointerEvent.done(); // complete test
-      }
-
-      function run() {
-          on_event(document.getElementById("done"), "click", end_of_interaction);
-
-          var target_list = ["target0", "target1"];
-          var pointer_event_list = ["pointerdown" , "pointermove", "pointerup"];
-          var mouse_event_list = ["mousedown", "mouseup", "mousemove"];
-          var last_pointer_event = null;
-
-          target_list.forEach(function(targetId) {
-              var target = document.getElementById(targetId);
-
-              pointer_event_list.forEach(function(eventName) {
-                  on_event(target, eventName, function (event) {
-                      detected_pointertypes[event.pointerType] = true;
-                      var label = event.type + "@" + targetId;
-
-                      if (event.type == "pointerdown") {
-                          test(function () {
-                              assert_true(event.isPrimary);
-                          }, "primary pointer " + label);
-                      }
-
-                      if (label === "pointerdown@target0")
-                          event.preventDefault();
-
-                      last_pointer_event = event;
-                  });
-              });
-
-              mouse_event_list.forEach(function(eventName) {
-                  on_event(target, eventName, function (event) {
-                      if (drop_event(event.type))
-                          return;
-
-                      event_log.push(event.type + "@" + targetId);
-
-                      include_next_mousemove = (event.type == "mousedown");
-                      test(function() {
-                          test(function () {
-                              assert_equals(event.timeStamp, last_pointer_event.timeStamp, "The time stamp of the compat mouse event should be the same as its pointerevent");
-                          });
-                      }, event.type + "'s time stamp should be the same as " + last_pointer_event.type + "'s time stamp.");
-                  });
-              });
-          });
-      }
-    </script>
-    <style>
-      #target0, #target1 {
-        margin: 20px;
-        touch-action: none;
-      }
-
-      #done {
-        margin: 20px;
-        border: 2px solid black;
-      }
-    </style>
-  </head>
-  <body onload="run()">
-    <h1>Pointer Event: Suppress compatibility mouse events on drag</h1>
-    <h4>
-      When a pointerdown is canceled, a mouse drag shouldn't fire any compatibility mouse events.
-    </h4>
-    <ol>
-      <li> Drag mouse within Target0 &amp; release.</li>
-      <li> Drag mouse within Target1 &amp; release.</li>
-      <li> Click Done.</li>
-    </ol>
-    <div id="target0">
-      Target0
-    </div>
-    <div id="target1">
-      Target1
-    </div>
-    <div id="done">
-      Done
-    </div>
-    <div id="complete-notice">
-      <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
-      <p>The following events were logged: <span id="event-log"></span>.</p>
-    </div>
-    <div id="log"></div>
-  </body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse.html
@@ -0,0 +1,145 @@
+<!doctype html>
+<html>
+  <head>
+    <title>Pointer Event: Suppress compatibility mouse events on drag</title>
+    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
+    <link rel="author" title="Google" href="http://www.google.com "/>
+    <meta name="assert" content="When a pointerdown is canceled, a mouse drag shouldn't fire any compatibility mouse events."/>
+    <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <script src="/resources/testdriver.js"></script>
+    <script src="/resources/testdriver-actions.js"></script>
+    <script src="/resources/testdriver-vendor.js"></script>
+    <script type="text/javascript" src="pointerevent_support.js"></script>
+    <script type="text/javascript">
+      var test_pointerEvent = async_test("Suppress compat mouse events on drag");
+      add_completion_callback(end_of_test);
+
+      var detected_pointertypes = {};
+      var event_log = [];
+
+      function end_of_test() {
+          showLoggedEvents();
+          showPointerTypes();
+      }
+
+      var include_next_mousemove = false;
+
+      // Limits logging/testing of mousemove.
+      function drop_event(event_type) {
+          return (event_type == "mousemove" && !include_next_mousemove);
+      }
+
+      function end_of_interaction() {
+          test(function () {
+              assert_equals(event_log.join(", "),
+                  "mousedown@target1, mousemove@target1, mouseup@target1");
+          }, "Event log");
+
+          test_pointerEvent.done(); // complete test
+      }
+
+      function run() {
+          on_event(document.getElementById("done"), "click", end_of_interaction);
+
+          var target_list = ["target0", "target1"];
+          var pointer_event_list = ["pointerdown" , "pointermove", "pointerup"];
+          var mouse_event_list = ["mousedown", "mouseup", "mousemove"];
+          var last_pointer_event = null;
+
+          target_list.forEach(function(targetId) {
+              var target = document.getElementById(targetId);
+
+              pointer_event_list.forEach(function(eventName) {
+                  on_event(target, eventName, function (event) {
+                      detected_pointertypes[event.pointerType] = true;
+                      var label = event.type + "@" + targetId;
+
+                      if (event.type == "pointerdown") {
+                          test(function () {
+                              assert_true(event.isPrimary);
+                          }, "primary pointer " + label);
+                      }
+
+                      if (label === "pointerdown@target0")
+                          event.preventDefault();
+
+                      last_pointer_event = event;
+                  });
+              });
+
+              mouse_event_list.forEach(function(eventName) {
+                  on_event(target, eventName, function (event) {
+                      if (drop_event(event.type))
+                          return;
+
+                      event_log.push(event.type + "@" + targetId);
+
+                      include_next_mousemove = (event.type == "mousedown");
+                      test(function() {
+                          test(function () {
+                              assert_equals(event.timeStamp, last_pointer_event.timeStamp, "The time stamp of the compat mouse event should be the same as its pointerevent");
+                          });
+                      }, event.type + "'s time stamp should be the same as " + last_pointer_event.type + "'s time stamp.");
+                  });
+              });
+          });
+
+          // Inject mouse inputs.
+          var target0 = document.getElementById('target0');
+          var target1 = document.getElementById('target1');
+          var targetDone = document.getElementById('done');
+          new test_driver.Actions()
+              .pointerMove(0, 0, {origin: target0})
+              .pointerDown()
+              .pointerMove(10, 0, {origin: target0})
+              .pointerUp()
+              .pointerMove(0, 0, {origin: target1})
+              .pointerDown()
+              .pointerMove(10, 0, {origin: target1})
+              .pointerUp()
+              .pointerMove(0, 0, {origin: targetDone})
+              .pointerDown()
+              .pointerUp()
+              .send();
+      }
+    </script>
+    <style>
+      #target0, #target1 {
+        margin: 20px;
+        touch-action: none;
+      }
+
+      #done {
+        margin: 20px;
+        border: 2px solid black;
+      }
+    </style>
+  </head>
+  <body onload="run()">
+    <h1>Pointer Event: Suppress compatibility mouse events on drag</h1>
+    <h4>
+      When a pointerdown is canceled, a mouse drag shouldn't fire any compatibility mouse events.
+    </h4>
+    <ol>
+      <li> Drag mouse within Target0 &amp; release.</li>
+      <li> Drag mouse within Target1 &amp; release.</li>
+      <li> Click Done.</li>
+    </ol>
+    <div id="target0">
+      Target0
+    </div>
+    <div id="target1">
+      Target1
+    </div>
+    <div id="done">
+      Done
+    </div>
+    <div id="complete-notice">
+      <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+      <p>The following events were logged: <span id="event-log"></span>.</p>
+    </div>
+    <div id="log"></div>
+  </body>
+</html>