Bug 1288187 - Enable touch tests on OS X. r=botond

Also remove a bunch of superfluous window.TouchEvent checks, because the test
harness forces the touch events enabled so the checks are never false.

MozReview-Commit-ID: FQcQiuo1sQ9
This commit is contained in:
Kartikaya Gupta 2016-07-25 17:33:10 -07:00
Родитель f27c48490f
Коммит 70f1d5a41e
6 изменённых файлов: 2 добавлений и 26 удалений

Просмотреть файл

@ -10,12 +10,6 @@
<script type="application/javascript">
function longPressLink() {
if (!window.TouchEvent) {
ok(true, "Touch events are not supported on this platform, sorry!\n");
subtestDone();
return;
}
synthesizeNativeTouch(document.getElementById('b'), 5, 5, SpecialPowers.DOMWindowUtils.TOUCH_CONTACT, function() {
dump("Finished synthesizing touch-start, waiting for events...\n");
});

Просмотреть файл

@ -38,12 +38,6 @@ function startTest() {
}
function clickButton() {
if (!window.TouchEvent) {
ok(true, "Touch events are not supported on this platform, sorry!\n");
subtestDone();
return;
}
document.addEventListener('click', clicked, false);
synthesizeNativeTap(document.getElementById('b'), 5, 5, function() {

Просмотреть файл

@ -10,12 +10,6 @@
<script type="application/javascript">
function clickButton() {
if (!window.TouchEvent) {
ok(true, "Touch events are not supported on this platform, sorry!\n");
subtestDone();
return;
}
document.addEventListener('click', clicked, false);
synthesizeNativeTap(document.getElementById('b'), 5, 5, function() {

Просмотреть файл

@ -12,12 +12,6 @@
var touchdownTime;
function longPressLink() {
if (!window.TouchEvent) {
ok(true, "Touch events are not supported on this platform, sorry!\n");
subtestDone();
return;
}
synthesizeNativeTouch(document.getElementById('b'), 5, 5, SpecialPowers.DOMWindowUtils.TOUCH_CONTACT, function() {
dump("Finished synthesizing touch-start, waiting for events...\n");
});

Просмотреть файл

@ -48,8 +48,7 @@ skip-if = (os == 'android') || (os == 'b2g') || (buildapp == 'mulet') # wheel ev
[test_frame_reconstruction.html]
[test_group_touchevents.html]
# Windows touch injection doesn't work in automation, but this test can be run locally on a windows touch device.
# On OS X we don't support touch events at all.
skip-if = (toolkit == 'windows') || (toolkit == 'cocoa')
skip-if = (toolkit == 'windows')
[test_group_wheelevents.html]
skip-if = (toolkit == 'android') # wheel events not supported on mobile
[test_group_mouseevents.html]

Просмотреть файл

@ -70,6 +70,7 @@ var subtests = [
];
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);