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
--- 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);
};