Bug 1339359 - [Pointer Event] Trigger PointerEvent test cases after focus. r=smaug
authorStone Shih <sshih@mozilla.com>
Wed, 15 Feb 2017 17:54:05 +0800
changeset 372941 96b7a3ed364bab98ace2bdc9a0d4a57ee55d6121
parent 372940 3a8c78a6146fa9fb3fa9f73d0547b6520e26a470
child 372942 13d5c32e4a61b1fec4669b80aefb801a9e5cb968
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1339359
milestone54.0a1
Bug 1339359 - [Pointer Event] Trigger PointerEvent test cases after focus. r=smaug MozReview-Commit-ID: J7AtGvSF1aP
dom/events/test/pointerevents/test_bug1285128.html
dom/events/test/pointerevents/test_bug1303704.html
dom/events/test/pointerevents/test_bug1315862.html
--- a/dom/events/test/pointerevents/test_bug1285128.html
+++ b/dom/events/test/pointerevents/test_bug1285128.html
@@ -36,13 +36,15 @@ function runTests() {
     SimpleTest.finish();
   });
 
   synthesizeMouseAtCenter(target0, { type: "mousemove",
                                      inputSource: SpecialPowers.Ci.nsIDOMMouseEvent.MOZ_SOURCE_MOUSE,
                                      isWidgetEventSynthesized: true });
 }
 
-SpecialPowers.pushPrefEnv({"set": [["dom.w3c_pointer_events.enabled", true]]}, runTests);
+SimpleTest.waitForFocus(() => {
+  SpecialPowers.pushPrefEnv({"set": [["dom.w3c_pointer_events.enabled", true]]}, runTests);
+});
 
 </script>
 </body>
 </html>
--- a/dom/events/test/pointerevents/test_bug1303704.html
+++ b/dom/events/test/pointerevents/test_bug1303704.html
@@ -42,13 +42,15 @@ function runTests() {
   synthesizeMouseAtCenter(link1, { type: "mousedown",
                                    inputSource: SpecialPowers.Ci.nsIDOMMouseEvent.MOZ_SOURCE_MOUSE });
   synthesizeMouseAtCenter(link1, { type: "mousemove",
                                    inputSource: SpecialPowers.Ci.nsIDOMMouseEvent.MOZ_SOURCE_MOUSE });
   synthesizeMouseAtCenter(link1, { type: "mouseup",
                                    inputSource: SpecialPowers.Ci.nsIDOMMouseEvent.MOZ_SOURCE_MOUSE });
 }
 
-SpecialPowers.pushPrefEnv({"set": [["dom.w3c_pointer_events.enabled", true]]}, runTests);
+SimpleTest.waitForFocus(() => {
+  SpecialPowers.pushPrefEnv({"set": [["dom.w3c_pointer_events.enabled", true]]}, runTests);
+});
 
 </script>
 </body>
 </html>
--- a/dom/events/test/pointerevents/test_bug1315862.html
+++ b/dom/events/test/pointerevents/test_bug1315862.html
@@ -54,13 +54,15 @@ function runTests() {
   synthesizeMouse(target, 5, 5, { type: "mousedown", inputSource: source },
                   iframe.contentWindow);
   synthesizeMouse(target, 5, 5, { type: "mousemove", inputSource: source },
                   iframe.contentWindow);
   synthesizeMouse(target, 5, 5, { type: "mouseup", inputSource: source },
                   iframe.contentWindow);
 }
 
-SpecialPowers.pushPrefEnv({"set": [["dom.w3c_pointer_events.enabled", true]]}, runTests);
+SimpleTest.waitForFocus(() => {
+  SpecialPowers.pushPrefEnv({"set": [["dom.w3c_pointer_events.enabled", true]]}, runTests);
+});
 
 </script>
 </body>
 </html>