test_group_zoom.html (3425B)
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 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 9 <script type="application/javascript"> 10 11 var prefs = [ 12 // We need the APZ paint logging information 13 ["apz.test.logging_enabled", true], 14 // Dropping the touch slop to 0 makes the tests easier to write because 15 // we can just do a one-pixel drag to get over the pan threshold rather 16 // than having to hard-code some larger value. 17 ["apz.touch_start_tolerance", "0.0"], 18 // The subtests in this test do touch-drags to pan the page, but we don't 19 // want those pans to turn into fling animations, so we increase the 20 // fling-min threshold velocity to an arbitrarily large value. 21 ["apz.fling_min_velocity_threshold", "10000"], 22 // The helper_bug1280013's div gets a displayport on scroll, but if the 23 // test takes too long the displayport can expire before we read the value 24 // out of the test. So we disable displayport expiry for these tests. 25 ["apz.displayport_expiry_ms", 0], 26 // Increase the content response timeout because some tests do preventDefault 27 // and we want to make sure APZ actually waits for them. 28 ["apz.content_response_timeout", 60000], 29 // Disable touch resampling so that touch events are processed without delay 30 // and we don't zoom more than expected due to overprediction. 31 ["android.touch_resampling.enabled", false], 32 ]; 33 34 // Increase the tap timeouts so the one-touch-pinch gesture is still detected 35 // in case of random delays during testing. Also ensure that the feature is 36 // actually enabled (which it should be by default, but it's good to be safe). 37 var onetouchpinch_prefs = [ 38 ...prefs, 39 ["apz.one_touch_pinch.enabled", true], 40 ["ui.click_hold_context_menus.delay", 10000], 41 ["apz.max_tap_time", 10000], 42 ]; 43 44 // For helper_fixed_pos_displayport the mechanism we use to record the 45 // fixed-pos displayport only takes effect when not in a partial display list 46 // update. So for this test we just disable retained display lists entirely. 47 var no_rdl_prefs = [ 48 ...prefs, 49 ["layout.display-list.retain", false], 50 ]; 51 52 var subtests = [ 53 {"file": "helper_basic_zoom.html", "prefs": prefs}, 54 {"file": "helper_basic_onetouchpinch.html", "prefs": onetouchpinch_prefs}, 55 {"file": "helper_zoom_prevented.html", "prefs": prefs}, 56 {"file": "helper_zoomed_pan.html", "prefs": prefs}, 57 {"file": "helper_fixed_position_scroll_hittest.html", "prefs": prefs}, 58 {"file": "helper_onetouchpinch_nested.html", "prefs": onetouchpinch_prefs}, 59 {"file": "helper_visual_smooth_scroll.html", "prefs": prefs}, 60 {"file": "helper_scroll_into_view_bug1516056.html", "prefs": prefs}, 61 {"file": "helper_scroll_into_view_bug1562757.html", "prefs": prefs}, 62 {"file": "helper_fixed_pos_displayport.html", "prefs": no_rdl_prefs}, 63 // If you're adding more tests, add them to test_group_zoom-2.html 64 ]; 65 66 if (isApzEnabled()) { 67 // This has a lot of subtests, and Android emulators are slow. 68 SimpleTest.requestLongerTimeout(2); 69 SimpleTest.waitForExplicitFinish(); 70 window.onload = function() { 71 runSubtestsSeriallyInFreshWindows(subtests) 72 .then(SimpleTest.finish, SimpleTest.finishWithFailure); 73 }; 74 } 75 76 </script> 77 </head> 78 <body> 79 </body> 80 </html>