Bug 1302297 - Part 5: Update related testcases. f=stone, r=smaug
authorHo-Pang Hsu <hopang.hsu@gmail.com>
Fri, 09 Dec 2016 03:40:00 +0100
changeset 325592 55a0e013901aecb44dc360133aaa22cca3372b68
parent 325591 13fd65d8a143c66d3bcf937a60b858ea91115955
child 325593 9fa1300f064dd6c5934300b80c0984ab1e366a19
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewerssmaug
bugs1302297
milestone53.0a1
Bug 1302297 - Part 5: Update related testcases. f=stone, r=smaug
dom/events/test/pointerevents/test_pointerevent_attributes_mouse-manual.html
dom/events/test/pointerevents/test_pointerevent_lostpointercapture_for_disconnected_node-manual.html
dom/events/test/pointerevents/test_pointerevent_pointercancel_touch-manual.html
dom/events/test/pointerevents/test_pointerevent_pointerenter-manual.html
dom/events/test/pointerevents/test_pointerevent_pointerleave_after_pointercancel_touch-manual.html
dom/events/test/pointerevents/test_pointerevent_pointermove-on-chorded-mouse-button.html
dom/events/test/pointerevents/test_pointerevent_pointermove_pointertype-manual.html
dom/events/test/pointerevents/test_pointerevent_pointerout_after_pointercancel_touch-manual.html
dom/events/test/pointerevents/test_pointerevent_releasepointercapture_invalid_pointerid-manual.html
dom/events/test/pointerevents/test_pointerevent_releasepointercapture_onpointercancel_touch-manual.html
dom/events/test/pointerevents/test_pointerevent_setpointercapture_invalid_pointerid-manual.html
--- a/dom/events/test/pointerevents/test_pointerevent_attributes_mouse-manual.html
+++ b/dom/events/test/pointerevents/test_pointerevent_attributes_mouse-manual.html
@@ -16,16 +16,16 @@ https://bugzilla.mozilla.org/show_bug.cg
       function startTest() {
         runTestInNewWindow("pointerevent_attributes_mouse-manual.html");
       }
       function executeTest(int_win) {
         sendMouseEvent(int_win, "square1", "mousemove");
         sendMouseEvent(int_win, "square1", "mousedown");
         sendMouseEvent(int_win, "square1", "mouseup");
         sendMouseEvent(int_win, "square1", "mousemove");
-        sendMouseEvent(int_win, "square1", "mousemove");
+        sendMouseEvent(int_win, "square1", "mousemove", {offsetX: -1, offSetY: -1});
       }
     </script>
   </head>
   <body>
   </body>
 </html>
 
--- a/dom/events/test/pointerevents/test_pointerevent_lostpointercapture_for_disconnected_node-manual.html
+++ b/dom/events/test/pointerevents/test_pointerevent_lostpointercapture_for_disconnected_node-manual.html
@@ -17,15 +17,16 @@ https://bugzilla.mozilla.org/show_bug.cg
       function startTest() {
         runTestInNewWindow("pointerevent_lostpointercapture_for_disconnected_node-manual.html");
       }
       function executeTest(int_win) {
         sendMouseEvent(int_win, "btnCapture", "mousedown");
         sendMouseEvent(int_win, "btnCapture", "mousemove");
         setTimeout(function() {
           sendMouseEvent(int_win, "target1", "mousemove");
+          sendMouseEvent(int_win, "target1", "mouseup");
         }, 500);
       }
     </script>
   </head>
   <body>
   </body>
 </html>
--- a/dom/events/test/pointerevents/test_pointerevent_pointercancel_touch-manual.html
+++ b/dom/events/test/pointerevents/test_pointerevent_pointercancel_touch-manual.html
@@ -14,14 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     <script type="text/javascript">
       SimpleTest.waitForExplicitFinish();
       function startTest() {
         runTestInNewWindow("pointerevent_pointercancel_touch-manual.html");
       }
       function executeTest(int_win) {
         sendTouchEvent(int_win, "target0", "touchstart");
         sendTouchEvent(int_win, "target0", "touchcancel");
+
+        // Need a touchend event to terminated the test gracefully.
+        sendTouchEvent(int_win, "target0", "touchend");
       }
     </script>
   </head>
   <body>
   </body>
 </html>
--- a/dom/events/test/pointerevents/test_pointerevent_pointerenter-manual.html
+++ b/dom/events/test/pointerevents/test_pointerevent_pointerenter-manual.html
@@ -13,14 +13,15 @@ https://bugzilla.mozilla.org/show_bug.cg
     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     <script type="text/javascript">
       SimpleTest.waitForExplicitFinish();
       function startTest() {
         runTestInNewWindow("pointerevent_pointerenter-manual.html");
       }
       function executeTest(int_win) {
         sendMouseEvent(int_win, "target0", "mousedown");
+        sendMouseEvent(int_win, "target0", "mouseup");
       }
     </script>
   </head>
   <body>
   </body>
 </html>
--- a/dom/events/test/pointerevents/test_pointerevent_pointerleave_after_pointercancel_touch-manual.html
+++ b/dom/events/test/pointerevents/test_pointerevent_pointerleave_after_pointercancel_touch-manual.html
@@ -14,14 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     <script type="text/javascript">
       SimpleTest.waitForExplicitFinish();
       function startTest() {
         runTestInNewWindow("pointerevent_pointerleave_after_pointercancel_touch-manual.html");
       }
       function executeTest(int_win) {
         sendTouchEvent(int_win, "target0", "touchstart");
         sendTouchEvent(int_win, "target0", "touchcancel");
+
+        // Need a touchend event to terminated the test gracefully.
+        sendTouchEvent(int_win, "target0", "touchend");
       }
     </script>
   </head>
   <body>
   </body>
 </html>
--- a/dom/events/test/pointerevents/test_pointerevent_pointermove-on-chorded-mouse-button.html
+++ b/dom/events/test/pointerevents/test_pointerevent_pointermove-on-chorded-mouse-button.html
@@ -13,23 +13,22 @@ https://bugzilla.mozilla.org/show_bug.cg
     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     <script type="text/javascript">
       SimpleTest.waitForExplicitFinish();
       function startTest() {
         runTestInNewWindow("pointerevent_pointermove-on-chorded-mouse-button.html");
       }
 
       function executeTest(int_win) {
-        var utils = _getDOMWindowUtils(int_win);
         sendMouseEvent(int_win, "target0", "mousemove");
-        sendMouseEvent(int_win, "target0", "mousedown");
+        sendMouseEvent(int_win, "target0", "mousedown", {button: MouseEventHelper.BUTTON_LEFT});
         sendMouseEvent(int_win, "target0", "mousemove");
-        sendMouseEvent(int_win, "target0", "mousedown");
+        sendMouseEvent(int_win, "target0", "mousedown", {button: MouseEventHelper.BUTTON_MIDDLE});
         sendMouseEvent(int_win, "target0", "mousemove");
-        sendMouseEvent(int_win, "target0", "mouseup");
+        sendMouseEvent(int_win, "target0", "mouseup", {button: MouseEventHelper.BUTTON_MIDDLE});
         sendMouseEvent(int_win, "target0", "mousemove");
-        sendMouseEvent(int_win, "target0", "mouseup");
+        sendMouseEvent(int_win, "target0", "mouseup", {button: MouseEventHelper.BUTTON_LEFT});
       }
     </script>
   </head>
   <body>
   </body>
 </html>
--- a/dom/events/test/pointerevents/test_pointerevent_pointermove_pointertype-manual.html
+++ b/dom/events/test/pointerevents/test_pointerevent_pointermove_pointertype-manual.html
@@ -14,14 +14,15 @@ https://bugzilla.mozilla.org/show_bug.cg
     <script type="text/javascript">
       SimpleTest.waitForExplicitFinish();
       function startTest() {
         runTestInNewWindow("pointerevent_pointermove_pointertype-manual.html");
       }
       function executeTest(int_win) {
         sendMouseEvent(int_win, "target0", "mousedown");
         sendMouseEvent(int_win, "target0", "mousemove");
+        sendMouseEvent(int_win, "target0", "mouseup");
       }
     </script>
   </head>
   <body>
   </body>
 </html>
--- a/dom/events/test/pointerevents/test_pointerevent_pointerout_after_pointercancel_touch-manual.html
+++ b/dom/events/test/pointerevents/test_pointerevent_pointerout_after_pointercancel_touch-manual.html
@@ -14,14 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     <script type="text/javascript">
       SimpleTest.waitForExplicitFinish();
       function startTest() {
         runTestInNewWindow("pointerevent_pointerout_after_pointercancel_touch-manual.html");
       }
       function executeTest(int_win) {
         sendTouchEvent(int_win, "target0", "touchstart");
         sendTouchEvent(int_win, "target0", "touchcancel");
+
+        // Need a touchend event to terminated the test gracefully.
+        sendTouchEvent(int_win, "target0", "touchend");
       }
     </script>
   </head>
   <body>
   </body>
 </html>
--- a/dom/events/test/pointerevents/test_pointerevent_releasepointercapture_invalid_pointerid-manual.html
+++ b/dom/events/test/pointerevents/test_pointerevent_releasepointercapture_invalid_pointerid-manual.html
@@ -14,14 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     <script type="text/javascript">
       SimpleTest.waitForExplicitFinish();
       function startTest() {
         runTestInNewWindow("pointerevent_releasepointercapture_invalid_pointerid-manual.html");
       }
       function executeTest(int_win) {
         sendTouchEvent(int_win, "target0", "touchstart");
         sendTouchEvent(int_win, "target0", "touchmove");
+
+        // Need a touchend event to terminated the test gracefully.
+        sendTouchEvent(int_win, "target0", "touchend");
       }
     </script>
   </head>
   <body>
   </body>
 </html>
--- a/dom/events/test/pointerevents/test_pointerevent_releasepointercapture_onpointercancel_touch-manual.html
+++ b/dom/events/test/pointerevents/test_pointerevent_releasepointercapture_onpointercancel_touch-manual.html
@@ -14,14 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     <script type="text/javascript">
       SimpleTest.waitForExplicitFinish();
       function startTest() {
         runTestInNewWindow("pointerevent_releasepointercapture_onpointercancel_touch-manual.html");
       }
       function executeTest(int_win) {
         sendTouchEvent(int_win, "target0", "touchstart");
         sendTouchEvent(int_win, "target0", "touchcancel");
+
+        // Need a touchend event to terminated the test gracefully.
+        sendTouchEvent(int_win, "target0", "touchend");
       }
     </script>
   </head>
   <body>
   </body>
 </html>
--- a/dom/events/test/pointerevents/test_pointerevent_setpointercapture_invalid_pointerid-manual.html
+++ b/dom/events/test/pointerevents/test_pointerevent_setpointercapture_invalid_pointerid-manual.html
@@ -13,14 +13,15 @@ https://bugzilla.mozilla.org/show_bug.cg
     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     <script type="text/javascript">
       SimpleTest.waitForExplicitFinish();
       function startTest() {
         runTestInNewWindow("pointerevent_setpointercapture_invalid_pointerid-manual.html");
       }
       function executeTest(int_win) {
         sendMouseEvent(int_win, "target0", "mousedown");
+        sendMouseEvent(int_win, "target0", "mouseup");
       }
     </script>
   </head>
   <body>
   </body>
 </html>