test_group_touchevents.html (1966B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Various touch tests that spawn in new windows</title> 6 <script src="/tests/SimpleTest/SimpleTest.js"></script> 7 <script type="application/javascript" src="apz_test_native_event_utils.js"></script> 8 <script type="application/javascript" src="apz_test_utils.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 10 <script type="application/javascript"> 11 12 var basic_pan_prefs = getPrefs("TOUCH_EVENTS:PAN"); 13 14 var subtests = [ 15 // Simple tests to exercise basic panning behaviour 16 {"file": "helper_basic_pan.html", "prefs": basic_pan_prefs}, 17 {"file": "helper_div_pan.html", "prefs": basic_pan_prefs}, 18 {"file": "helper_iframe_pan.html", "prefs": basic_pan_prefs}, 19 20 // Simple test to exercise touch-tapping behaviour 21 {"file": "helper_tap.html"}, 22 // Tapping, but with a full-zoom applied 23 {"file": "helper_tap_fullzoom.html"}, 24 25 // For the following two tests, disable displayport suppression to make sure it 26 // doesn't interfere with the test by scheduling paints non-deterministically. 27 {"file": "helper_scrollto_tap.html?true", 28 "prefs": [["apz.paint_skipping.enabled", true]], 29 "dp_suppression": false}, 30 {"file": "helper_scrollto_tap.html?false", 31 "prefs": [["apz.paint_skipping.enabled", false]], 32 "dp_suppression": false}, 33 34 // Add new subtests to test_group_touch_events-N.html (for largest N), 35 // not this file. 36 ]; 37 38 if (isApzEnabled()) { 39 ok(window.TouchEvent, "Check if TouchEvent is supported (it should be, the test harness forces it on everywhere)"); 40 if (getPlatform() == "android") { 41 // This has a lot of subtests, and Android emulators are slow. 42 SimpleTest.requestLongerTimeout(2); 43 } 44 45 SimpleTest.waitForExplicitFinish(); 46 window.onload = function() { 47 runSubtestsSeriallyInFreshWindows(subtests) 48 .then(SimpleTest.finish, SimpleTest.finishWithFailure); 49 }; 50 } 51 52 </script> 53 </head> 54 <body> 55 </body> 56 </html>