mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-10-22 02:25:05 +00:00
57 lines
1.4 KiB
HTML
57 lines
1.4 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<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',
|
|
];
|
|
|
|
var testIndex = -1;
|
|
var w = null;
|
|
|
|
function testDone() {
|
|
if (w) {
|
|
w.close();
|
|
}
|
|
testIndex++;
|
|
if (testIndex < tests.length) {
|
|
w = window.open(tests[testIndex], "_blank");
|
|
} else {
|
|
SimpleTest.finish();
|
|
}
|
|
}
|
|
|
|
window.onload = function() {
|
|
SpecialPowers.pushPrefEnv(
|
|
{ "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"],
|
|
]
|
|
}, testDone);
|
|
};
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
</body>
|
|
</html>
|