Bug 931445 part 4 - Ensure pointer is moved into the window for APZ mouseevent test. r=kats
authorXidorn Quan <me@upsuper.org>
Fri, 27 May 2016 17:13:05 +1000
changeset 372097 daf83079577fa7b8407c18164c6cf490290c8304
parent 372096 ab3d00f4e239cc38d8c692d2854689af11537eda
child 372098 0fa7d5fb96afee035e4fe0cfa27692c9c7d344a2
push id19437
push userdburns@mozilla.com
push dateFri, 27 May 2016 11:32:28 +0000
reviewerskats
bugs931445
milestone49.0a1
Bug 931445 part 4 - Ensure pointer is moved into the window for APZ mouseevent test. r=kats MozReview-Commit-ID: HiRf1qHjSL9
gfx/layers/apz/test/mochitest/helper_drag_click.html
--- a/gfx/layers/apz/test/mochitest/helper_drag_click.html
+++ b/gfx/layers/apz/test/mochitest/helper_drag_click.html
@@ -7,16 +7,18 @@
   <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
   <script type="application/javascript" src="apz_test_utils.js"></script>
   <script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
   <script type="application/javascript">
 
 function* test(testDriver) {
   document.addEventListener('click', clicked, false);
 
+  // Ensure the pointer is inside the window
+  yield synthesizeNativeMouseEvent(document.getElementById('b'), 5, 5, nativeMouseMoveEventMsg(), testDriver);
   // mouse down, move it around, and release it near where it went down. this
   // should generate a click at the release point
   yield synthesizeNativeMouseEvent(document.getElementById('b'), 5, 5, nativeMouseDownEventMsg(), testDriver);
   yield synthesizeNativeMouseEvent(document.getElementById('b'), 100, 100, nativeMouseMoveEventMsg(), testDriver);
   yield synthesizeNativeMouseEvent(document.getElementById('b'), 10, 10, nativeMouseMoveEventMsg(), testDriver);
   yield synthesizeNativeMouseEvent(document.getElementById('b'), 8, 8, nativeMouseUpEventMsg(), testDriver);
   dump("Finished synthesizing click with a drag in the middle\n");
 }