test_group_checkerboarding.html (2763B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <script type="application/javascript" src="apz_test_utils.js"></script> 7 <script type="application/javascript" src="apz_test_native_event_utils.js"></script> 8 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 9 <script type="application/javascript"> 10 if (isApzEnabled()) { 11 SimpleTest.waitForExplicitFinish(); 12 13 14 var prefs = [ 15 ["apz.test.logging_enabled", true], 16 ["apz.displayport_expiry_ms", 0], 17 ["general.smoothScroll", false], 18 // Avoid extra paints from scrollbar fading out 19 ["layout.testing.overlay-scrollbars.always-visible", true], 20 ]; 21 22 var px_ratio_1_prefs = [ 23 ...prefs, 24 ["layout.css.devPixelsPerPx", 1.0], 25 ]; 26 27 var zoom_and_pan_prefs = [ 28 ...prefs, 29 ...getPrefs("TOUCH_EVENTS:PAN"), 30 ]; 31 32 var no_multiplier_prefs = [ 33 ...zoom_and_pan_prefs, 34 ["apz.x_skate_size_multiplier", "0.0"], 35 ["apz.y_skate_size_multiplier", "0.0"], 36 ["apz.x_stationary_size_multiplier", "0.0"], 37 ["apz.y_stationary_size_multiplier", "0.0"], 38 ]; 39 40 var subtests = [ 41 { file: "helper_checkerboard_apzforcedisabled.html", prefs }, 42 { file: "helper_checkerboard_scrollinfo.html", prefs }, 43 { file: "helper_horizontal_checkerboard.html", "prefs": px_ratio_1_prefs }, 44 { file: "helper_checkerboard_no_multiplier.html", "prefs": no_multiplier_prefs }, 45 { file: "helper_checkerboard_zoom_during_load.html", "prefs": no_multiplier_prefs }, 46 { file: "helper_wide_crossorigin_iframe.html", prefs }, 47 { file: "helper_reset_zoom_bug1818967.html", prefs }, 48 ]; 49 50 let platform = getPlatform(); 51 if (platform != "windows") { 52 subtests.push( 53 { file: "helper_checkerboard_zoomoverflowhidden.html", "prefs": zoom_and_pan_prefs } 54 ); 55 } 56 57 var scrollbarbutton_prefs = [ 58 ...prefs, 59 ["general.smoothScroll", true] 60 ]; 61 62 // Only Windows has scrollbar buttons in automation. 63 if (platform == "windows") { 64 subtests.push( 65 { file: "helper_scrollbarbuttonclick_checkerboard.html", "prefs": scrollbarbutton_prefs}, 66 ); 67 } 68 69 // Run the actual test in its own window, because it requires that the 70 // root APZC be scrollable. Mochitest pages themselves often run 71 // inside an iframe which means we have no control over the root APZC. 72 window.onload = () => { 73 runSubtestsSeriallyInFreshWindows(subtests) 74 .then(SimpleTest.finish, SimpleTest.finishWithFailure); 75 }; 76 } 77 </script> 78 </head> 79 <body> 80 </body> 81 </html>