Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Various touch tests that spawn in new windows (7)</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="apz_test_native_event_utils.js"></script>
<script type="application/javascript" src="apz_test_utils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
var isWindows = getPlatform() == "windows";
var subtests = [
{"file": "helper_bug1839095.html",
"prefs": [...getPrefs("TOUCH_EVENTS:PAN"),
["apz.fastpath_apz_aware_listener.enabled", true]]},
{"file": "helper_bug1839095-overflow-hidden.html",
"prefs": [...getPrefs("TOUCH_EVENTS:PAN"),
["apz.fastpath_apz_aware_listener.enabled", true]]},
{"file": "helper_bug2041154-static.html",
"prefs": [...getPrefs("TOUCH_EVENTS:PAN"),
["apz.fastpath_apz_aware_listener.enabled", true]]},
{"file": "helper_bug2041154-irregular.html",
"prefs": [...getPrefs("TOUCH_EVENTS:PAN"),
["apz.fastpath_apz_aware_listener.enabled", true]]},
{"file": "helper_bug2041154-irregular-dynamic.html",
"prefs": [...getPrefs("TOUCH_EVENTS:PAN"),
["apz.fastpath_apz_aware_listener.enabled", true]]},
{"file": "helper_bug2041154-irregular-static.html",
"prefs": [...getPrefs("TOUCH_EVENTS:PAN"),
["apz.fastpath_apz_aware_listener.enabled", true]]},
{"file": "helper_bug2052759.html",
"prefs": [...getPrefs("TOUCH_EVENTS:PAN"),
["apz.fastpath_apz_aware_listener.enabled", true]]},
{"file": "helper_bug2062598.html",
"prefs": [["apz.fling_min_velocity_threshold", "0.0"],
["apz.velocity_relevance_time_ms", 1000],
/* The touchstart of the fling can turn into a long-tap, and
thus into a context menu, if the touch-move events get held
up. */
["ui.click_hold_context_menus.delay", 10000],
/* On Windows the touch-end of the fling causes error, maybe
["apz.test.fails_with_native_injection", isWindows],
/* These are necessary to observe overscroll animations */
["apz.test.logging_enabled", true],
["apz.overscroll.damping", 10.0],
["apz.overscroll.spring_stiffness", 50.0]]},
{"file": "helper_bug2062598_with_two_axes.html",
"prefs": [["apz.fling_min_velocity_threshold", "0.0"],
["apz.velocity_relevance_time_ms", 1000],
/* The touchstart of the fling can turn into a long-tap, and
thus into a context menu, if the touch-move events get held
up. */
["ui.click_hold_context_menus.delay", 10000],
/* On Windows the touch-end of the fling causes error, maybe
["apz.test.fails_with_native_injection", isWindows],
/* These are necessary to observe overscroll animations */
["apz.test.logging_enabled", true],
["apz.overscroll.damping", 10.0],
["apz.overscroll.spring_stiffness", 50.0]]},
{"file": "helper_bug2062598_with_non_scrollable_middle.html",
"prefs": [["apz.fling_min_velocity_threshold", "0.0"],
["apz.velocity_relevance_time_ms", 1000],
/* The touchstart of the fling can turn into a long-tap, and
thus into a context menu, if the touch-move events get held
up. */
["ui.click_hold_context_menus.delay", 10000],
/* On Windows the touch-end of the fling causes error, maybe
["apz.test.fails_with_native_injection", isWindows],
/* These are necessary to observe overscroll animations */
["apz.test.logging_enabled", true],
["apz.overscroll.damping", 10.0],
["apz.overscroll.spring_stiffness", 50.0]]},
// Add new subtests here. If this starts timing out because it's taking too
// long, create a test_group_touchevents-8.html file. Refer to 1423011#c57
// for more details.
];
if (isApzEnabled()) {
ok(window.TouchEvent, "Check if TouchEvent is supported (it should be, the test harness forces it on everywhere)");
if (getPlatform() == "android") {
// This has a lot of subtests, and Android emulators are slow.
SimpleTest.requestLongerTimeout(2);
}
SimpleTest.waitForExplicitFinish();
window.onload = function() {
runSubtestsSeriallyInFreshWindows(subtests)
.then(SimpleTest.finish, SimpleTest.finishWithFailure);
};
}
</script>
</head>
<body>
</body>
</html>