Bug 1431728 - Make the APZ-specific guts of the code dependent on an APZ check. r=aryx
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 19 Jan 2018 10:01:04 -0500
changeset 454358 5dddf1e00d79e7b252f00f35a2dd3dd1d4004642
parent 454357 6d9dc65ca0ed1a374dde7592a5b4191a7a10759c
child 454359 a36c57e9279da697b7c71e349c408ee14ba82510
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaryx
bugs1431728
milestone59.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 1431728 - Make the APZ-specific guts of the code dependent on an APZ check. r=aryx MozReview-Commit-ID: 50tYbmFGRcx
dom/events/test/pointerevents/test_bug1414336.html
--- a/dom/events/test/pointerevents/test_bug1414336.html
+++ b/dom/events/test/pointerevents/test_bug1414336.html
@@ -54,46 +54,48 @@ https://bugzilla.mozilla.org/show_bug.cg
   <p>Test bug1414336</p>
   <p>Test bug1414336</p>
   <p>Test bug1414336</p>
   <p>Test bug1414336</p>
   <p>Test bug1414336</p>
 </div>
 <script type="text/javascript">
 /** Test for Bug 1414336 **/
-SimpleTest.waitForExplicitFinish();
+if (isApzEnabled()) {
+  SimpleTest.waitForExplicitFinish();
 
-waitUntilApzStable().then(() => {
-  let isWindows = (getPlatform() == "windows");
-  SpecialPowers.pushPrefEnv({"set": [["dom.w3c_pointer_events.enabled", true],
-                                     ["apz.test.fails_with_native_injection", isWindows]]}, () => {
+  waitUntilApzStable().then(() => {
+    let isWindows = (getPlatform() == "windows");
+    SpecialPowers.pushPrefEnv({"set": [["dom.w3c_pointer_events.enabled", true],
+                                       ["apz.test.fails_with_native_injection", isWindows]]}, () => {
 
-    let target0 = window.document.getElementById("target0");
-    let target0_events = ["pointerdown", "pointermove"];
+      let target0 = window.document.getElementById("target0");
+      let target0_events = ["pointerdown", "pointermove"];
 
-    target0_events.forEach((elem, index, arr) => {
-      target0.addEventListener(elem, (event) => {
-        is(event.type, target0_events[0], "receive " + event.type + " on target0");
-        target0_events.shift();
-      }, { once: true });
-    });
+      target0_events.forEach((elem, index, arr) => {
+        target0.addEventListener(elem, (event) => {
+          is(event.type, target0_events[0], "receive " + event.type + " on target0");
+          target0_events.shift();
+        }, { once: true });
+      });
 
-    target0.addEventListener("pointercancel", (event) => {
-      ok(false, "Shouldn't receive pointercancel when content prevents default on touchstart");
-      SimpleTest.finish();
-    }, { once: true });
+      target0.addEventListener("pointercancel", (event) => {
+        ok(false, "Shouldn't receive pointercancel when content prevents default on touchstart");
+        SimpleTest.finish();
+      }, { once: true });
 
-    target0.addEventListener("touchstart", (event) => {
-      event.preventDefault();
-    }, { once: true });
+      target0.addEventListener("touchstart", (event) => {
+        event.preventDefault();
+      }, { once: true });
 
-    target0.addEventListener("pointerup", (event) => {
-      ok(target0_events.length == 0, " should receive " + target0_events + " on target0");
-      SimpleTest.finish();
-    }, { once: true });
+      target0.addEventListener("pointerup", (event) => {
+        ok(target0_events.length == 0, " should receive " + target0_events + " on target0");
+        SimpleTest.finish();
+      }, { once: true });
 
-    synthesizeNativeTouchDrag(target0, 2, 2, 0, 80);
+      synthesizeNativeTouchDrag(target0, 2, 2, 0, 80);
+    });
   });
-});
+}
 
 </script>
 </body>
 </html>