Bug 1219980 - Ensure that long-press gestures don't get detected during test_basic_pan.html r=botond
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 01 Mar 2016 16:45:08 -0500
changeset 325198 44538bccb87ca1d7b3b3f70eeeaa193bc4b62a8a
parent 325197 004f09562d01873bbb3bf29236b5bdd6917232ab
child 325199 90e4525b29897857e1485b51af1d1ce324c61da0
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1219980
milestone47.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 1219980 - Ensure that long-press gestures don't get detected during test_basic_pan.html r=botond Chaos mode can cause the the long-press timer to fire too early, so we have to disable that. Also the pref to extend the timer is an int pref, not a char pref, so drop the quotes (otherwise specialpowersAPI.js guesses the wrong type). MozReview-Commit-ID: 4NefSNwwcht
gfx/layers/apz/test/mochitest/test_basic_pan.html
--- a/gfx/layers/apz/test/mochitest/test_basic_pan.html
+++ b/gfx/layers/apz/test/mochitest/test_basic_pan.html
@@ -3,17 +3,16 @@
 <head>
   <meta charset="utf-8">
   <title>Sanity panning test</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
-SimpleTest.testInChaosMode();
 
 // this page just serially loads each one of the following test helper pages in
 // a new window and waits for it to call testDone()
 var tests = [
   'helper_basic_pan.html',
   'helper_div_pan.html',
   'helper_iframe_pan.html',
 ];
@@ -48,18 +47,20 @@ window.onload = function() {
     { "set":
       [
         // Dropping the touch slop to 0 makes the tests easier to write because
         // we can just do a one-pixel drag to get over the pan threshold rather
         // than having to hard-code some larger value.
         ["apz.touch_start_tolerance", "0.0"],
         // The touchstart from the drag can turn into a long-tap if the touch-move
         // events get held up. Try to prevent that by making long-taps require
-        // a 10 second hold.
-        ["ui.click_hold_context_menus.delay", "10000"],
+        // a 10 second hold. Note that we also cannot enable chaos mode on this
+        // test for this reason, since chaos mode can cause the long-press timer
+        // to fire sooner than the pref dictates.
+        ["ui.click_hold_context_menus.delay", 10000],
         // The subtests in this test do touch-drags to pan the page, but we don't
         // want those pans to turn into fling animations, so we increase the
         // fling-stop threshold velocity to absurdly high.
         ["apz.fling_stopped_threshold", "10000"],
       ]
     }, testDone);
 };