test_group_double_tap_zoom-2.html (5410B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Various zoom-related tests that spawn in new windows</title> 6 <script src="/tests/SimpleTest/SimpleTest.js"></script> 7 <script type="application/javascript" src="apz_test_utils.js"></script> 8 <script type="application/javascript" src="apz_test_native_event_utils.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 10 <script type="application/javascript"> 11 12 // Increase the tap timeouts so the double-tap is still detected in case of 13 // random delays during testing. 14 var doubletap_prefs = [ 15 ["ui.click_hold_context_menus.delay", 10000], 16 ["apz.max_tap_time", 10000], 17 ]; 18 19 var longeranimation_doubletap_prefs = [ 20 ...doubletap_prefs, 21 ["apz.zoom_animation_duration_ms", 1000], 22 ]; 23 24 var logging_and_doubletap_prefs = [ 25 ...doubletap_prefs, 26 ["apz.test.logging_enabled", true], 27 ]; 28 29 var disable_default_zoomin_and_doubletap_prefs = [ 30 ...doubletap_prefs, 31 ["apz.doubletapzoom.defaultzoomin", "1.0"], 32 ]; 33 34 var meta_viewport_and_doubletap_prefs = [ 35 ...doubletap_prefs, 36 ["dom.meta-viewport.enabled", true], 37 ]; 38 39 var subtests = [ 40 {"file": "helper_doubletap_zoom_smooth.html", "prefs": longeranimation_doubletap_prefs}, 41 {"file": "helper_doubletap_zoom_fixedpos_overflow.html", "prefs": logging_and_doubletap_prefs}, 42 {"file": "helper_doubletap_zoom_hscrollable.html", "prefs": disable_default_zoomin_and_doubletap_prefs}, 43 {"file": "helper_doubletap_zoom_scrolled_overflowhidden.html", "prefs": doubletap_prefs}, 44 {"file": "helper_doubletap_zoom_shadowdom.html", "prefs": doubletap_prefs}, 45 {"file": "helper_doubletap_zoom_tablecell.html", "prefs": disable_default_zoomin_and_doubletap_prefs}, 46 {"file": "helper_doubletap_zoom_gencon.html", "prefs": doubletap_prefs}, 47 {"file": "helper_doubletap_zoom_hscrollable2.html", "prefs": doubletap_prefs}, 48 {"file": "helper_doubletap_zoom_nothing.html", "prefs": doubletap_prefs}, 49 {"file": "helper_doubletap_zoom_noscroll.html", "prefs": doubletap_prefs}, 50 {"file": "helper_doubletap_zoom_oopif.html", "prefs": doubletap_prefs}, 51 {"file": "helper_doubletap_zoom_oopif-2.html", "prefs": [ 52 ...meta_viewport_and_doubletap_prefs, 53 ["layout.disable-pixel-alignment", true], 54 ]}, 55 {"file": "helper_disallow_doubletap_zoom_inside_oopif.html", "prefs": meta_viewport_and_doubletap_prefs}, 56 {"file": "helper_doubletap_zoom_nothing_listener.html", "prefs": doubletap_prefs}, 57 {"file": "helper_doubletap_zoom_touch_action_manipulation.html", "prefs": meta_viewport_and_doubletap_prefs}, 58 {"file": "helper_doubletap_zoom_touch_action_manipulation_in_iframe.html", "prefs": meta_viewport_and_doubletap_prefs}, 59 {"file": "helper_doubletap_zoom_square.html", "prefs": doubletap_prefs}, 60 // Run helper_doubletap_zoom_square.html again inside a specific sized window to cause 61 // some floating calculation errors during double-tap-to-zoom. 62 {"file": "helper_doubletap_zoom_square.html", 63 "prefs": doubletap_prefs, 64 "windowFeatures": "popup,width=750,height=503"}, 65 ]; 66 67 if (getPlatform() == "mac") { 68 subtests.push( 69 {"file": "helper_doubletap_zoom_smooth.html?touchpad", "prefs": longeranimation_doubletap_prefs}, 70 {"file": "helper_doubletap_zoom_fixedpos_overflow.html?touchpad", "prefs": logging_and_doubletap_prefs}, 71 {"file": "helper_doubletap_zoom_hscrollable.html?touchpad", "prefs": disable_default_zoomin_and_doubletap_prefs}, 72 {"file": "helper_doubletap_zoom_scrolled_overflowhidden.html?touchpad", "prefs": doubletap_prefs}, 73 {"file": "helper_doubletap_zoom_shadowdom.html?touchpad", "prefs": doubletap_prefs}, 74 {"file": "helper_doubletap_zoom_tablecell.html?touchpad", "prefs": disable_default_zoomin_and_doubletap_prefs}, 75 {"file": "helper_doubletap_zoom_gencon.html?touchpad", "prefs": doubletap_prefs}, 76 {"file": "helper_doubletap_zoom_hscrollable2.html?touchpad", "prefs": doubletap_prefs}, 77 {"file": "helper_doubletap_zoom_nothing.html?touchpad", "prefs": doubletap_prefs}, 78 {"file": "helper_doubletap_zoom_noscroll.html?touchpad", "prefs": doubletap_prefs}, 79 {"file": "helper_doubletap_zoom_square.html?touchpad", "prefs": doubletap_prefs}, 80 // Just like the non-touchpad case, run inside a specific sized window. 81 {"file": "helper_doubletap_zoom_square.html?touchpad", 82 "prefs": doubletap_prefs, 83 "windowFeatures": "popup,width=750,height=503"}, 84 {"file": "helper_doubletap_zoom_oopif.html?touchpad", "prefs": doubletap_prefs}, 85 {"file": "helper_doubletap_zoom_oopif-2.html?touchpad", "prefs": doubletap_prefs}, 86 {"file": "helper_disallow_doubletap_zoom_inside_oopif.html?touchpad", "prefs": meta_viewport_and_doubletap_prefs}, 87 {"file": "helper_doubletap_zoom_nothing_listener.html?touchpad", "prefs": [ 88 ...doubletap_prefs, 89 ["layout.disable-pixel-alignment", true]]}, 90 {"file": "helper_doubletap_zoom_touch_action_manipulation.html?touchpad", "prefs": doubletap_prefs}, 91 {"file": "helper_doubletap_zoom_touch_action_manipulation_in_iframe.html?touchpad", "prefs": doubletap_prefs}, 92 ); 93 } 94 95 if (isApzEnabled()) { 96 // This has a lot of subtests, and Android emulators are slow. 97 SimpleTest.requestLongerTimeout(2); 98 SimpleTest.waitForExplicitFinish(); 99 window.onload = function() { 100 runSubtestsSeriallyInFreshWindows(subtests) 101 .then(SimpleTest.finish, SimpleTest.finishWithFailure); 102 }; 103 } 104 105 </script> 106 </head> 107 <body> 108 </body> 109 </html>