test_group_mouseevents.html (5161B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Various mouse 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 let synthesizedMouseEventsTestPrefs = [ 13 // Touch activation duration must be set to a large value to ensure the test 14 // fails if touch synthesized mouse event dispatch is delayed. 15 ["ui.touch_activation.duration_ms", 90000] 16 ]; 17 18 var subtests = [ 19 // Sanity test to synthesize a mouse click 20 {"file": "helper_click.html?dtc=false"}, 21 // Same as above, but with a dispatch-to-content region that exercises the 22 // main-thread notification codepaths for mouse events 23 {"file": "helper_click.html?dtc=true"}, 24 // Sanity test for click but with some mouse movement between the down and up 25 {"file": "helper_drag_click.html"}, 26 // Test for dragging on the scrollbar of the root scrollable element works. 27 // This takes different codepaths with async zooming support enabled and 28 // disabled, and so needs to be tested separately for both. 29 {"file": "helper_drag_root_scrollbar.html", "prefs": [["apz.allow_zooming", false]]}, 30 {"file": "helper_drag_root_scrollbar.html", "prefs": [["apz.allow_zooming", true]]}, 31 {"file": "helper_drag_scrollbar_hittest.html", "prefs": [ 32 // The test applies a scaling zoom to the page. 33 ["apz.allow_zooming", true], 34 // The test uses hitTest(), these two prefs are required for it. 35 ["test.events.async.enabled", true], 36 ["apz.test.logging_enabled", true], 37 // The test performs scrollbar dragging, avoid auto-hiding scrollbars. 38 ["ui.useOverlayScrollbars", 0] 39 ]}, 40 // Test for dragging on a fake-scrollbar element that scrolls the page 41 {"file": "helper_drag_scroll.html"}, 42 // Test for dragging the scrollbar with a fixed-pos element overlaying it 43 {"file": "helper_bug1346632.html"}, 44 // Test for scrollbar-dragging on a scrollframe that's inactive 45 {"file": "helper_bug1326290.html"}, 46 // Test for scrollbar-dragging on a scrollframe inside an SVGEffects 47 {"file": "helper_bug1331693.html"}, 48 // Test for scrollbar-dragging on a transformed scrollframe inside a fixed-pos item 49 {"file": "helper_bug1462961.html"}, 50 // Scrollbar dragging where we exercise the snapback behaviour by moving the 51 // mouse away from the scrollbar during drag 52 {"file": "helper_scrollbar_snap_bug1501062.html"}, 53 // Tests for scrollbar-dragging on scrollframes inside nested transforms 54 {"file": "helper_bug1490393.html"}, 55 {"file": "helper_bug1490393-2.html"}, 56 // Scrollbar-dragging on scrollframes inside filters inside transforms 57 {"file": "helper_bug1550510.html"}, 58 // Drag-select some text after reconstructing the RSF of a non-RCD to ensure 59 // the pending visual offset update doesn't get stuck 60 {"file": "helper_visualscroll_nonrcd_rsf.html"}, 61 // Scrollbar-dragging on scrollframes inside nested transforms with scale 62 {"file": "helper_bug1662800.html"}, 63 // Scrollbar-dragging on subframe with enclosing translation transform 64 {"file": "helper_drag_bug1719913.html"}, 65 // Scrollbar dragging when pinch-zoomed in does not work with slider.snapMultiplier 66 {"file": "helper_drag_bug1794590.html", "prefs": [["slider.snapMultiplier", 6]]}, 67 // Scrollbar-dragging on scrollframe containing OOP iframe when zoomed in 68 {"file": "helper_drag_bug1827330.html"}, 69 // Scrolling with mouse down on the scrollbar 70 {"file": "helper_scrollbartrack_click_overshoot.html", 71 "prefs": [["test.events.async.enabled", true], ["apz.test.logging_enabled", true], 72 ["ui.useOverlayScrollbars", 0], 73 ["layout.scrollbars.click_and_hold_track.continue_to_end", false]]}, 74 {"file": "helper_bug1756814.html", "prefs": [ 75 ["ui.useOverlayScrollbars", 0] 76 ]}, 77 {"file": "helper_touch_synthesized_mouseevents.html?scrollable=true", 78 "prefs": synthesizedMouseEventsTestPrefs}, 79 {"file": "helper_touch_synthesized_mouseevents.html?scrollable=false", 80 "prefs": synthesizedMouseEventsTestPrefs}, 81 {"file": "helper_mousemove_optimization.html", 82 "prefs": [["apz.mousemove_hittest_optimization.enabled", true]]}, 83 {"file": "helper_mousemove_optimization_on_oop_in_fixed_position.html", 84 "prefs": [["apz.mousemove_hittest_optimization.enabled", true]]}, 85 ]; 86 87 // Android, mac, and linux (at least in our automation) do not have scrollbar buttons. 88 if (getPlatform() == "windows") { 89 subtests.push( 90 // Basic test that click and hold on a scrollbar button works as expected 91 { file: "helper_scrollbarbutton_repeat.html", "prefs": [["general.smoothScroll", false]] } 92 ); 93 } 94 95 if (isApzEnabled()) { 96 SimpleTest.waitForExplicitFinish(); 97 SimpleTest.expectAssertions(0, 2); // from helper_bug1550510.html, bug 1232856 98 window.onload = function() { 99 runSubtestsSeriallyInFreshWindows(subtests) 100 .then(SimpleTest.finish, SimpleTest.finishWithFailure); 101 }; 102 } 103 104 </script> 105 </head> 106 <body> 107 </body> 108 </html>