From 2aa4a82499d4becd2284cdb482213d541b8804dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 16:29:10 +0200 Subject: Adding upstream version 86.0.1. Signed-off-by: Daniel Baumann --- dom/events/test/.eslintrc.js | 9 + dom/events/test/browser.ini | 17 + dom/events/test/browser_alt_keyup_in_content.js | 321 ++ ..._beforeinput_by_execCommand_in_contentscript.js | 108 + dom/events/test/browser_bug1539497.js | 28 + .../test/browser_mouse_enterleave_switch_tab.js | 158 + ...er_conflicts_with_content_accesskey_modifier.js | 102 + dom/events/test/bug1017086_inner.html | 41 + dom/events/test/bug226361_iframe.xhtml | 47 + dom/events/test/bug299673.js | 150 + dom/events/test/bug322588-popup.html | 1 + dom/events/test/bug415498-doc1.html | 15 + dom/events/test/bug415498-doc2.html | 15 + dom/events/test/bug418986-3.js | 83 + dom/events/test/bug426082.html | 116 + dom/events/test/bug545268.html | 1 + dom/events/test/bug574663.html | 3 + dom/events/test/bug591249_iframe.xhtml | 33 + dom/events/test/bug602962.xhtml | 8 + dom/events/test/bug607464.html | 3 + dom/events/test/bug656379-1.html | 186 ++ dom/events/test/chrome.ini | 30 + dom/events/test/empty.js | 0 dom/events/test/error_event_worker.js | 19 + dom/events/test/event_leak_utils.js | 84 + ...eforeinput_by_execCommand_in_contentscript.html | 2 + dom/events/test/file_bug1446834.html | 96 + dom/events/test/file_bug1484371.html | 94 + dom/events/test/file_bug679494.html | 8 + dom/events/test/file_coalesce_touchmove.html | 169 + dom/events/test/file_empty.html | 1 + dom/events/test/file_event_screenXY.html | 20 + ...focus_blur_on_click_in_cross_origin_iframe.html | 23 + ...on_click_in_deep_cross_origin_iframe_inner.html | 23 + ...n_click_in_deep_cross_origin_iframe_middle.html | 30 + dom/events/test/file_mouse_enterleave.html | 40 + dom/events/test/mochitest.ini | 251 ++ ...93174_implicit_pointer_capture_for_touch_1.html | 63 + ...93174_implicit_pointer_capture_for_touch_2.html | 64 + .../test/pointerevents/bug_1420589_iframe1.html | 17 + .../test/pointerevents/bug_1420589_iframe2.html | 17 + .../file_pointercapture_xorigin_iframe.html | 62 + ..._pointercapture_xorigin_iframe_pointerlock.html | 111 + .../file_test_trigger_fullscreen.html | 1 + dom/events/test/pointerevents/iframe.html | 7 + dom/events/test/pointerevents/mochitest.ini | 116 + .../pointerevents/mochitest_support_external.js | 286 ++ .../pointerevents/mochitest_support_internal.js | 125 + .../test/pointerevents/pointerevent_utils.js | 60 + dom/events/test/pointerevents/readme.md | 9 + dom/events/test/pointerevents/test_bug1285128.html | 53 + ...93174_implicit_pointer_capture_for_touch_1.html | 30 + ...93174_implicit_pointer_capture_for_touch_2.html | 30 + dom/events/test/pointerevents/test_bug1303704.html | 135 + dom/events/test/pointerevents/test_bug1315862.html | 68 + dom/events/test/pointerevents/test_bug1323158.html | 93 + dom/events/test/pointerevents/test_bug1403055.html | 92 + .../test/pointerevents/test_bug1420589_1.html | 103 + .../test/pointerevents/test_bug1420589_2.html | 120 + .../test/pointerevents/test_bug1420589_3.html | 113 + .../pointerevents/test_getCoalescedEvents.html | 92 + .../test/pointerevents/test_multiple_touches.html | 189 ++ .../test_pointercapture_remove_iframe.html | 80 + .../test_pointercapture_xorigin_iframe.html | 54 + ...test_remove_frame_when_got_pointer_capture.html | 170 + .../test_trigger_fullscreen_by_pointer_events.html | 55 + ...event_attributes_hoverable_pointers-manual.html | 53 + ...erevent_attributes_nohover_pointers-manual.html | 26 + ...revent_boundary_events_in_capturing-manual.html | 46 + ...ge-touch-action-onpointerdown_touch-manual.html | 39 + .../test_wpt_pointerevent_constructor.html | 26 + ...t_wpt_pointerevent_drag_interaction-manual.html | 38 + .../test_wpt_pointerevent_movementxy-manual.html | 53 + ...le_primary_pointers_boundary_events-manual.html | 31 + ...st_wpt_pointerevent_pointerId_scope-manual.html | 27 + ...pt_pointerevent_pointercancel_touch-manual.html | 30 + ...nterleave_after_pointercancel_touch-manual.html | 30 + ...t_wpt_pointerevent_pointerleave_pen-manual.html | 28 + ...ointerout_after_pointercancel_touch-manual.html | 30 + ...est_wpt_pointerevent_pointerout_pen-manual.html | 28 + ...ercapture_events_to_original_target-manual.html | 49 + ...ointercapture_onpointercancel_touch-manual.html | 30 + ...vent_releasepointercapture_pointerup_touch.html | 29 + ...equence_at_implicit_release_on_drag-manual.html | 27 + ...terevent_setpointercapture_pointerup_touch.html | 26 + .../test/pointerevents/test_wpt_touch_action.html | 103 + .../test/pointerevents/touch_action_helpers.js | 263 ++ ...touch-action_two-finger_interaction-manual.html | 102 + .../html/pointerevent_drag_interaction-manual.html | 103 + dom/events/test/pointerevents/wpt/idlharness.html | 104 + ...event_attributes_hoverable_pointers-manual.html | 143 + ...erevent_attributes_nohover_pointers-manual.html | 126 + ...revent_boundary_events_in_capturing-manual.html | 97 + ...ge-touch-action-onpointerdown_touch-manual.html | 135 + .../wpt/pointerevent_constructor.html | 106 + ...le_primary_pointers_boundary_events-manual.html | 145 + .../wpt/pointerevent_pointerId_scope-manual.html | 82 + .../pointerevent_pointercancel_touch-manual.html | 77 + ...nterleave_after_pointercancel_touch-manual.html | 66 + .../wpt/pointerevent_pointerleave_pen-manual.html | 58 + ...ointerout_after_pointercancel_touch-manual.html | 67 + .../wpt/pointerevent_pointerout_pen-manual.html | 57 + ...ercapture_events_to_original_target-manual.html | 137 + ...ointercapture_onpointercancel_touch-manual.html | 71 + ...vent_releasepointercapture_pointerup_touch.html | 102 + ...quence_at_implicit_release_on_click-manual.html | 83 + ...equence_at_implicit_release_on_drag-manual.html | 84 + ...terevent_setpointercapture_pointerup_touch.html | 102 + .../test/pointerevents/wpt/pointerevent_styles.css | 112 + .../test/pointerevents/wpt/pointerevent_support.js | 333 ++ ...erevent_touch-action-auto-css_touch-manual.html | 129 + ...vent_touch-action-button-test_touch-manual.html | 110 + .../wpt/pointerevent_touch-action-illegal.html | 67 + ...inherit_child-auto-child-none_touch-manual.html | 117 + ...uch-action-inherit_child-none_touch-manual.html | 112 + ...herit_child-pan-x-child-pan-x_touch-manual.html | 112 + ...herit_child-pan-x-child-pan-y_touch-manual.html | 117 + ...n-inherit_highest-parent-none_touch-manual.html | 133 + ...ch-action-inherit_parent-none_touch-manual.html | 112 + .../pointerevent_touch-action-keyboard-manual.html | 124 + .../pointerevent_touch-action-mouse-manual.html | 130 + ...erevent_touch-action-none-css_touch-manual.html | 111 + ...ent_touch-action-pan-down-css_touch-manual.html | 114 + ...ent_touch-action-pan-left-css_touch-manual.html | 114 + ...nt_touch-action-pan-right-css_touch-manual.html | 114 + ...event_touch-action-pan-up-css_touch-manual.html | 114 + ...revent_touch-action-pan-x-css_touch-manual.html | 106 + ...ouch-action-pan-x-pan-y-pan-y_touch-manual.html | 111 + ...vent_touch-action-pan-x-pan-y_touch-manual.html | 126 + ...revent_touch-action-pan-y-css_touch-manual.html | 106 + ...revent_touch-action-span-test_touch-manual.html | 114 + ...erevent_touch-action-svg-test_touch-manual.html | 122 + ...event_touch-action-table-test_touch-manual.html | 145 + .../pointerevent_touch-action-verification.html | 91 + .../pointerevent_movementxy-manual.html | 99 + .../resources/pointerevent_movementxy-iframe.html | 8 + ...event_attributes_hoverable_pointers-iframe.html | 10 + .../pointerevent_pointerId_scope-iframe.html | 35 + dom/events/test/test_DataTransferItemList.html | 234 ++ dom/events/test/test_accel_virtual_modifier.html | 90 + dom/events/test/test_addEventListenerExtraArg.html | 31 + dom/events/test/test_all_synthetic_events.html | 470 +++ dom/events/test/test_bug1003432.html | 45 + dom/events/test/test_bug1003432.js | 31 + dom/events/test/test_bug1013412.html | 111 + dom/events/test/test_bug1017086_disable.html | 41 + dom/events/test/test_bug1017086_enable.html | 43 + dom/events/test/test_bug1037990.html | 61 + dom/events/test/test_bug1079236.html | 66 + dom/events/test/test_bug1127588.html | 61 + dom/events/test/test_bug1128787-1.html | 53 + dom/events/test/test_bug1128787-2.html | 54 + dom/events/test/test_bug1128787-3.html | 53 + dom/events/test/test_bug1145910.html | 54 + dom/events/test/test_bug1150308.html | 49 + dom/events/test/test_bug1248459.html | 58 + dom/events/test/test_bug1264380.html | 82 + dom/events/test/test_bug1298970.html | 33 + dom/events/test/test_bug1304044.html | 133 + dom/events/test/test_bug1305458.html | 50 + dom/events/test/test_bug1327798.html | 47 + dom/events/test/test_bug1332699.html | 37 + dom/events/test/test_bug1339758.html | 80 + dom/events/test/test_bug1369072.html | 37 + dom/events/test/test_bug1412775.xhtml | 66 + dom/events/test/test_bug1429572.html | 43 + dom/events/test/test_bug1446834.html | 33 + dom/events/test/test_bug1447993.html | 42 + dom/events/test/test_bug1484371.html | 27 + dom/events/test/test_bug1518442.html | 49 + dom/events/test/test_bug1534562.html | 51 + dom/events/test/test_bug1539497.html | 30 + dom/events/test/test_bug1581192.html | 66 + dom/events/test/test_bug1673434.html | 75 + dom/events/test/test_bug1686716.html | 28 + dom/events/test/test_bug226361.xhtml | 82 + dom/events/test/test_bug238987.html | 279 ++ dom/events/test/test_bug288392.html | 103 + dom/events/test/test_bug299673-1.html | 61 + dom/events/test/test_bug299673-2.html | 60 + dom/events/test/test_bug322588.html | 66 + dom/events/test/test_bug328885.html | 132 + dom/events/test/test_bug336682.js | 96 + dom/events/test/test_bug336682_1.html | 55 + dom/events/test/test_bug336682_2.xhtml | 59 + dom/events/test/test_bug367781.html | 53 + dom/events/test/test_bug379120.html | 55 + dom/events/test/test_bug402089.html | 67 + dom/events/test/test_bug405632.html | 34 + dom/events/test/test_bug409604.html | 379 +++ dom/events/test/test_bug412567.html | 47 + dom/events/test/test_bug415498.xhtml | 95 + dom/events/test/test_bug418986-3.html | 25 + dom/events/test/test_bug418986-3.xhtml | 27 + dom/events/test/test_bug422132.html | 124 + dom/events/test/test_bug426082.html | 30 + dom/events/test/test_bug427537.html | 61 + dom/events/test/test_bug428988.html | 44 + dom/events/test/test_bug432698.html | 223 ++ dom/events/test/test_bug443985.html | 76 + dom/events/test/test_bug447736.html | 47 + dom/events/test/test_bug448602.html | 220 ++ dom/events/test/test_bug450876.html | 47 + dom/events/test/test_bug456273.html | 41 + dom/events/test/test_bug457672.html | 55 + dom/events/test/test_bug489671.html | 55 + dom/events/test/test_bug493251.html | 181 + dom/events/test/test_bug508479.html | 110 + dom/events/test/test_bug517851.html | 122 + dom/events/test/test_bug524674.xhtml | 130 + dom/events/test/test_bug534833.html | 156 + dom/events/test/test_bug545268.html | 129 + dom/events/test/test_bug547996-1.html | 87 + dom/events/test/test_bug547996-2.xhtml | 125 + dom/events/test/test_bug556493.html | 74 + dom/events/test/test_bug563329.html | 82 + dom/events/test/test_bug574663.html | 193 ++ dom/events/test/test_bug586961.xhtml | 46 + dom/events/test/test_bug591249.xhtml | 73 + dom/events/test/test_bug591815.html | 68 + dom/events/test/test_bug593959.html | 60 + dom/events/test/test_bug602962.xhtml | 87 + dom/events/test/test_bug603008.html | 556 ++++ dom/events/test/test_bug605242.html | 58 + dom/events/test/test_bug607464.html | 84 + dom/events/test/test_bug613634.html | 90 + dom/events/test/test_bug615597.html | 39 + dom/events/test/test_bug617528.xhtml | 94 + dom/events/test/test_bug624127.html | 35 + dom/events/test/test_bug635465.html | 90 + dom/events/test/test_bug641477.html | 37 + dom/events/test/test_bug648573.html | 120 + dom/events/test/test_bug650493.html | 215 ++ dom/events/test/test_bug656379-1.html | 30 + dom/events/test/test_bug656379-2.html | 115 + dom/events/test/test_bug656954.html | 42 + dom/events/test/test_bug659071.html | 39 + dom/events/test/test_bug659350.html | 111 + dom/events/test/test_bug662678.html | 153 + dom/events/test/test_bug667612.html | 38 + dom/events/test/test_bug667919-1.html | 41 + dom/events/test/test_bug679494.xhtml | 36 + dom/events/test/test_bug684208.html | 80 + dom/events/test/test_bug687787.html | 616 ++++ dom/events/test/test_bug689564.html | 65 + dom/events/test/test_bug698929.html | 47 + dom/events/test/test_bug704423.html | 40 + dom/events/test/test_bug741666.html | 176 + dom/events/test/test_bug812744.html | 37 + dom/events/test/test_bug822898.html | 343 ++ dom/events/test/test_bug855741.html | 90 + dom/events/test/test_bug864040.html | 87 + dom/events/test/test_bug924087.html | 45 + dom/events/test/test_bug930374-chrome.html | 57 + dom/events/test/test_bug930374-content.html | 70 + dom/events/test/test_bug944011.html | 52 + dom/events/test/test_bug944847.html | 42 + dom/events/test/test_bug946632.html | 162 + dom/events/test/test_bug967796.html | 243 ++ dom/events/test/test_bug985988.html | 89 + dom/events/test/test_bug998809.html | 35 + .../test_click_on_reframed_generated_text.html | 32 + .../test/test_click_on_restyled_element.html | 51 + dom/events/test/test_clickevent_on_input.html | 108 + dom/events/test/test_coalesce_touchmove.html | 18 + dom/events/test/test_continuous_wheel_events.html | 3290 ++++++++++++++++++ .../test_dblclick_explicit_original_target.html | 52 + dom/events/test/test_deviceSensor.html | 136 + dom/events/test/test_disabled_events.html | 40 + dom/events/test/test_dnd_with_modifiers.html | 78 + dom/events/test/test_dom_activate_event.html | 91 + dom/events/test/test_dom_keyboard_event.html | 548 +++ dom/events/test/test_dom_mouse_event.html | 143 + dom/events/test/test_dom_storage_event.html | 62 + dom/events/test/test_dom_wheel_event.html | 835 +++++ dom/events/test/test_draggableprop.html | 89 + dom/events/test/test_dragstart.html | 631 ++++ dom/events/test/test_error_events.html | 71 + dom/events/test/test_eventTimeStamp.html | 116 + dom/events/test/test_event_handler_cc.html | 77 + ...test_event_screenXY_in_cross_origin_iframe.html | 110 + dom/events/test/test_eventctors.html | 936 ++++++ dom/events/test/test_eventctors.xhtml | 49 + dom/events/test/test_eventctors_sensors.html | 110 + dom/events/test/test_eventhandler_scoping.html | 17 + dom/events/test/test_focus_abspos.html | 32 + ...focus_blur_on_click_in_cross_origin_iframe.html | 119 + ..._blur_on_click_in_deep_cross_origin_iframe.html | 146 + dom/events/test/test_hover_mouseleave.html | 47 + dom/events/test/test_legacy_event.html | 297 ++ dom/events/test/test_legacy_non-primary_click.html | 53 + dom/events/test/test_legacy_touch_api.html | 65 + dom/events/test/test_marquee_events.html | 31 + dom/events/test/test_messageEvent.html | 79 + dom/events/test/test_messageEvent_init.html | 25 + dom/events/test/test_mouse_capture_iframe.html | 67 + dom/events/test/test_mouse_enterleave_iframe.html | 272 ++ .../test/test_moz_mouse_pixel_scroll_event.html | 1363 ++++++++ dom/events/test/test_offsetxy.html | 98 + dom/events/test/test_onerror_handler_args.html | 36 + dom/events/test/test_passive_listeners.html | 118 + dom/events/test/test_paste_image.html | 192 ++ dom/events/test/test_slotted_mouse_event.html | 97 + dom/events/test/test_slotted_text_click.html | 72 + dom/events/test/test_text_event_in_content.html | 69 + .../test/test_unbound_before_in_active_chain.html | 38 + ..._event_model_on_newer_Office_Online_Server.html | 65 + ...lit_keypress_event_model_on_old_Confluence.html | 88 + ...ss_event_model_on_old_Office_Online_Server.html | 75 + dom/events/test/test_wheel_default_action.html | 39 + .../test/test_wheel_zoom_on_form_controls.html | 62 + dom/events/test/window_bug1369072.html | 156 + dom/events/test/window_bug1412775.xhtml | 8 + dom/events/test/window_bug1429572.html | 345 ++ dom/events/test/window_bug1447993.html | 239 ++ dom/events/test/window_bug493251.html | 13 + dom/events/test/window_bug617528.xhtml | 9 + dom/events/test/window_bug659071.html | 69 + dom/events/test/window_wheel_default_action.html | 3512 ++++++++++++++++++++ 319 files changed, 38377 insertions(+) create mode 100644 dom/events/test/.eslintrc.js create mode 100644 dom/events/test/browser.ini create mode 100644 dom/events/test/browser_alt_keyup_in_content.js create mode 100644 dom/events/test/browser_beforeinput_by_execCommand_in_contentscript.js create mode 100644 dom/events/test/browser_bug1539497.js create mode 100644 dom/events/test/browser_mouse_enterleave_switch_tab.js create mode 100644 dom/events/test/browser_shortcutkey_modifier_conflicts_with_content_accesskey_modifier.js create mode 100644 dom/events/test/bug1017086_inner.html create mode 100644 dom/events/test/bug226361_iframe.xhtml create mode 100644 dom/events/test/bug299673.js create mode 100644 dom/events/test/bug322588-popup.html create mode 100644 dom/events/test/bug415498-doc1.html create mode 100644 dom/events/test/bug415498-doc2.html create mode 100644 dom/events/test/bug418986-3.js create mode 100644 dom/events/test/bug426082.html create mode 100644 dom/events/test/bug545268.html create mode 100644 dom/events/test/bug574663.html create mode 100644 dom/events/test/bug591249_iframe.xhtml create mode 100644 dom/events/test/bug602962.xhtml create mode 100644 dom/events/test/bug607464.html create mode 100644 dom/events/test/bug656379-1.html create mode 100644 dom/events/test/chrome.ini create mode 100644 dom/events/test/empty.js create mode 100644 dom/events/test/error_event_worker.js create mode 100644 dom/events/test/event_leak_utils.js create mode 100644 dom/events/test/file_beforeinput_by_execCommand_in_contentscript.html create mode 100644 dom/events/test/file_bug1446834.html create mode 100644 dom/events/test/file_bug1484371.html create mode 100644 dom/events/test/file_bug679494.html create mode 100644 dom/events/test/file_coalesce_touchmove.html create mode 100644 dom/events/test/file_empty.html create mode 100644 dom/events/test/file_event_screenXY.html create mode 100644 dom/events/test/file_focus_blur_on_click_in_cross_origin_iframe.html create mode 100644 dom/events/test/file_focus_blur_on_click_in_deep_cross_origin_iframe_inner.html create mode 100644 dom/events/test/file_focus_blur_on_click_in_deep_cross_origin_iframe_middle.html create mode 100644 dom/events/test/file_mouse_enterleave.html create mode 100644 dom/events/test/mochitest.ini create mode 100644 dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_1.html create mode 100644 dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_2.html create mode 100644 dom/events/test/pointerevents/bug_1420589_iframe1.html create mode 100644 dom/events/test/pointerevents/bug_1420589_iframe2.html create mode 100644 dom/events/test/pointerevents/file_pointercapture_xorigin_iframe.html create mode 100644 dom/events/test/pointerevents/file_pointercapture_xorigin_iframe_pointerlock.html create mode 100644 dom/events/test/pointerevents/file_test_trigger_fullscreen.html create mode 100644 dom/events/test/pointerevents/iframe.html create mode 100644 dom/events/test/pointerevents/mochitest.ini create mode 100644 dom/events/test/pointerevents/mochitest_support_external.js create mode 100644 dom/events/test/pointerevents/mochitest_support_internal.js create mode 100644 dom/events/test/pointerevents/pointerevent_utils.js create mode 100644 dom/events/test/pointerevents/readme.md create mode 100644 dom/events/test/pointerevents/test_bug1285128.html create mode 100644 dom/events/test/pointerevents/test_bug1293174_implicit_pointer_capture_for_touch_1.html create mode 100644 dom/events/test/pointerevents/test_bug1293174_implicit_pointer_capture_for_touch_2.html create mode 100644 dom/events/test/pointerevents/test_bug1303704.html create mode 100644 dom/events/test/pointerevents/test_bug1315862.html create mode 100644 dom/events/test/pointerevents/test_bug1323158.html create mode 100644 dom/events/test/pointerevents/test_bug1403055.html create mode 100644 dom/events/test/pointerevents/test_bug1420589_1.html create mode 100644 dom/events/test/pointerevents/test_bug1420589_2.html create mode 100644 dom/events/test/pointerevents/test_bug1420589_3.html create mode 100644 dom/events/test/pointerevents/test_getCoalescedEvents.html create mode 100644 dom/events/test/pointerevents/test_multiple_touches.html create mode 100644 dom/events/test/pointerevents/test_pointercapture_remove_iframe.html create mode 100644 dom/events/test/pointerevents/test_pointercapture_xorigin_iframe.html create mode 100644 dom/events/test/pointerevents/test_remove_frame_when_got_pointer_capture.html create mode 100644 dom/events/test/pointerevents/test_trigger_fullscreen_by_pointer_events.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_attributes_hoverable_pointers-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_attributes_nohover_pointers-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_boundary_events_in_capturing-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_change-touch-action-onpointerdown_touch-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_constructor.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_drag_interaction-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_movementxy-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_multiple_primary_pointers_boundary_events-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_pointerId_scope-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_pointercancel_touch-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_pointerleave_after_pointercancel_touch-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_pointerleave_pen-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_pointerout_after_pointercancel_touch-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_pointerout_pen-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_events_to_original_target-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_onpointercancel_touch-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_pointerup_touch.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_sequence_at_implicit_release_on_drag-manual.html create mode 100644 dom/events/test/pointerevents/test_wpt_pointerevent_setpointercapture_pointerup_touch.html create mode 100644 dom/events/test/pointerevents/test_wpt_touch_action.html create mode 100644 dom/events/test/pointerevents/touch_action_helpers.js create mode 100644 dom/events/test/pointerevents/wpt/compat/pointerevent_touch-action_two-finger_interaction-manual.html create mode 100644 dom/events/test/pointerevents/wpt/html/pointerevent_drag_interaction-manual.html create mode 100644 dom/events/test/pointerevents/wpt/idlharness.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_attributes_hoverable_pointers-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_attributes_nohover_pointers-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_boundary_events_in_capturing-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_change-touch-action-onpointerdown_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_constructor.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_multiple_primary_pointers_boundary_events-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_pointerId_scope-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_pointercancel_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_pointerleave_after_pointercancel_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_pointerleave_pen-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_pointerout_after_pointercancel_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_pointerout_pen-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_events_to_original_target-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_onpointercancel_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_pointerup_touch.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_sequence_at_implicit_release_on_click-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_sequence_at_implicit_release_on_drag-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_setpointercapture_pointerup_touch.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_styles.css create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_support.js create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-auto-css_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-button-test_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-illegal.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-auto-child-none_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-none_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-pan-x-child-pan-x_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-pan-x-child-pan-y_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_highest-parent-none_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_parent-none_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-keyboard-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-mouse-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-none-css_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-down-css_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-left-css_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-right-css_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-up-css_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-css_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-pan-y-pan-y_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-pan-y_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-y-css_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-span-test_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-svg-test_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-table-test_touch-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerevent_touch-action-verification.html create mode 100644 dom/events/test/pointerevents/wpt/pointerlock/pointerevent_movementxy-manual.html create mode 100644 dom/events/test/pointerevents/wpt/pointerlock/resources/pointerevent_movementxy-iframe.html create mode 100644 dom/events/test/pointerevents/wpt/resources/pointerevent_attributes_hoverable_pointers-iframe.html create mode 100644 dom/events/test/pointerevents/wpt/resources/pointerevent_pointerId_scope-iframe.html create mode 100644 dom/events/test/test_DataTransferItemList.html create mode 100644 dom/events/test/test_accel_virtual_modifier.html create mode 100644 dom/events/test/test_addEventListenerExtraArg.html create mode 100644 dom/events/test/test_all_synthetic_events.html create mode 100644 dom/events/test/test_bug1003432.html create mode 100644 dom/events/test/test_bug1003432.js create mode 100644 dom/events/test/test_bug1013412.html create mode 100644 dom/events/test/test_bug1017086_disable.html create mode 100644 dom/events/test/test_bug1017086_enable.html create mode 100644 dom/events/test/test_bug1037990.html create mode 100644 dom/events/test/test_bug1079236.html create mode 100644 dom/events/test/test_bug1127588.html create mode 100644 dom/events/test/test_bug1128787-1.html create mode 100644 dom/events/test/test_bug1128787-2.html create mode 100644 dom/events/test/test_bug1128787-3.html create mode 100644 dom/events/test/test_bug1145910.html create mode 100644 dom/events/test/test_bug1150308.html create mode 100644 dom/events/test/test_bug1248459.html create mode 100644 dom/events/test/test_bug1264380.html create mode 100644 dom/events/test/test_bug1298970.html create mode 100644 dom/events/test/test_bug1304044.html create mode 100644 dom/events/test/test_bug1305458.html create mode 100644 dom/events/test/test_bug1327798.html create mode 100644 dom/events/test/test_bug1332699.html create mode 100644 dom/events/test/test_bug1339758.html create mode 100644 dom/events/test/test_bug1369072.html create mode 100644 dom/events/test/test_bug1412775.xhtml create mode 100644 dom/events/test/test_bug1429572.html create mode 100644 dom/events/test/test_bug1446834.html create mode 100644 dom/events/test/test_bug1447993.html create mode 100644 dom/events/test/test_bug1484371.html create mode 100644 dom/events/test/test_bug1518442.html create mode 100644 dom/events/test/test_bug1534562.html create mode 100644 dom/events/test/test_bug1539497.html create mode 100644 dom/events/test/test_bug1581192.html create mode 100644 dom/events/test/test_bug1673434.html create mode 100644 dom/events/test/test_bug1686716.html create mode 100644 dom/events/test/test_bug226361.xhtml create mode 100644 dom/events/test/test_bug238987.html create mode 100644 dom/events/test/test_bug288392.html create mode 100644 dom/events/test/test_bug299673-1.html create mode 100644 dom/events/test/test_bug299673-2.html create mode 100644 dom/events/test/test_bug322588.html create mode 100644 dom/events/test/test_bug328885.html create mode 100644 dom/events/test/test_bug336682.js create mode 100644 dom/events/test/test_bug336682_1.html create mode 100644 dom/events/test/test_bug336682_2.xhtml create mode 100644 dom/events/test/test_bug367781.html create mode 100644 dom/events/test/test_bug379120.html create mode 100644 dom/events/test/test_bug402089.html create mode 100644 dom/events/test/test_bug405632.html create mode 100644 dom/events/test/test_bug409604.html create mode 100644 dom/events/test/test_bug412567.html create mode 100644 dom/events/test/test_bug415498.xhtml create mode 100644 dom/events/test/test_bug418986-3.html create mode 100644 dom/events/test/test_bug418986-3.xhtml create mode 100644 dom/events/test/test_bug422132.html create mode 100644 dom/events/test/test_bug426082.html create mode 100644 dom/events/test/test_bug427537.html create mode 100644 dom/events/test/test_bug428988.html create mode 100644 dom/events/test/test_bug432698.html create mode 100644 dom/events/test/test_bug443985.html create mode 100644 dom/events/test/test_bug447736.html create mode 100644 dom/events/test/test_bug448602.html create mode 100644 dom/events/test/test_bug450876.html create mode 100644 dom/events/test/test_bug456273.html create mode 100644 dom/events/test/test_bug457672.html create mode 100644 dom/events/test/test_bug489671.html create mode 100644 dom/events/test/test_bug493251.html create mode 100644 dom/events/test/test_bug508479.html create mode 100644 dom/events/test/test_bug517851.html create mode 100644 dom/events/test/test_bug524674.xhtml create mode 100644 dom/events/test/test_bug534833.html create mode 100644 dom/events/test/test_bug545268.html create mode 100644 dom/events/test/test_bug547996-1.html create mode 100644 dom/events/test/test_bug547996-2.xhtml create mode 100644 dom/events/test/test_bug556493.html create mode 100644 dom/events/test/test_bug563329.html create mode 100644 dom/events/test/test_bug574663.html create mode 100644 dom/events/test/test_bug586961.xhtml create mode 100644 dom/events/test/test_bug591249.xhtml create mode 100644 dom/events/test/test_bug591815.html create mode 100644 dom/events/test/test_bug593959.html create mode 100644 dom/events/test/test_bug602962.xhtml create mode 100644 dom/events/test/test_bug603008.html create mode 100644 dom/events/test/test_bug605242.html create mode 100644 dom/events/test/test_bug607464.html create mode 100644 dom/events/test/test_bug613634.html create mode 100644 dom/events/test/test_bug615597.html create mode 100644 dom/events/test/test_bug617528.xhtml create mode 100644 dom/events/test/test_bug624127.html create mode 100644 dom/events/test/test_bug635465.html create mode 100644 dom/events/test/test_bug641477.html create mode 100644 dom/events/test/test_bug648573.html create mode 100644 dom/events/test/test_bug650493.html create mode 100644 dom/events/test/test_bug656379-1.html create mode 100644 dom/events/test/test_bug656379-2.html create mode 100644 dom/events/test/test_bug656954.html create mode 100644 dom/events/test/test_bug659071.html create mode 100644 dom/events/test/test_bug659350.html create mode 100644 dom/events/test/test_bug662678.html create mode 100644 dom/events/test/test_bug667612.html create mode 100644 dom/events/test/test_bug667919-1.html create mode 100644 dom/events/test/test_bug679494.xhtml create mode 100644 dom/events/test/test_bug684208.html create mode 100644 dom/events/test/test_bug687787.html create mode 100644 dom/events/test/test_bug689564.html create mode 100644 dom/events/test/test_bug698929.html create mode 100644 dom/events/test/test_bug704423.html create mode 100644 dom/events/test/test_bug741666.html create mode 100644 dom/events/test/test_bug812744.html create mode 100644 dom/events/test/test_bug822898.html create mode 100644 dom/events/test/test_bug855741.html create mode 100644 dom/events/test/test_bug864040.html create mode 100644 dom/events/test/test_bug924087.html create mode 100644 dom/events/test/test_bug930374-chrome.html create mode 100644 dom/events/test/test_bug930374-content.html create mode 100644 dom/events/test/test_bug944011.html create mode 100644 dom/events/test/test_bug944847.html create mode 100644 dom/events/test/test_bug946632.html create mode 100644 dom/events/test/test_bug967796.html create mode 100644 dom/events/test/test_bug985988.html create mode 100644 dom/events/test/test_bug998809.html create mode 100644 dom/events/test/test_click_on_reframed_generated_text.html create mode 100644 dom/events/test/test_click_on_restyled_element.html create mode 100644 dom/events/test/test_clickevent_on_input.html create mode 100644 dom/events/test/test_coalesce_touchmove.html create mode 100644 dom/events/test/test_continuous_wheel_events.html create mode 100644 dom/events/test/test_dblclick_explicit_original_target.html create mode 100644 dom/events/test/test_deviceSensor.html create mode 100644 dom/events/test/test_disabled_events.html create mode 100644 dom/events/test/test_dnd_with_modifiers.html create mode 100644 dom/events/test/test_dom_activate_event.html create mode 100644 dom/events/test/test_dom_keyboard_event.html create mode 100644 dom/events/test/test_dom_mouse_event.html create mode 100644 dom/events/test/test_dom_storage_event.html create mode 100644 dom/events/test/test_dom_wheel_event.html create mode 100644 dom/events/test/test_draggableprop.html create mode 100644 dom/events/test/test_dragstart.html create mode 100644 dom/events/test/test_error_events.html create mode 100644 dom/events/test/test_eventTimeStamp.html create mode 100644 dom/events/test/test_event_handler_cc.html create mode 100644 dom/events/test/test_event_screenXY_in_cross_origin_iframe.html create mode 100644 dom/events/test/test_eventctors.html create mode 100644 dom/events/test/test_eventctors.xhtml create mode 100644 dom/events/test/test_eventctors_sensors.html create mode 100644 dom/events/test/test_eventhandler_scoping.html create mode 100644 dom/events/test/test_focus_abspos.html create mode 100644 dom/events/test/test_focus_blur_on_click_in_cross_origin_iframe.html create mode 100644 dom/events/test/test_focus_blur_on_click_in_deep_cross_origin_iframe.html create mode 100644 dom/events/test/test_hover_mouseleave.html create mode 100644 dom/events/test/test_legacy_event.html create mode 100644 dom/events/test/test_legacy_non-primary_click.html create mode 100644 dom/events/test/test_legacy_touch_api.html create mode 100644 dom/events/test/test_marquee_events.html create mode 100644 dom/events/test/test_messageEvent.html create mode 100644 dom/events/test/test_messageEvent_init.html create mode 100644 dom/events/test/test_mouse_capture_iframe.html create mode 100644 dom/events/test/test_mouse_enterleave_iframe.html create mode 100644 dom/events/test/test_moz_mouse_pixel_scroll_event.html create mode 100644 dom/events/test/test_offsetxy.html create mode 100644 dom/events/test/test_onerror_handler_args.html create mode 100644 dom/events/test/test_passive_listeners.html create mode 100644 dom/events/test/test_paste_image.html create mode 100644 dom/events/test/test_slotted_mouse_event.html create mode 100644 dom/events/test/test_slotted_text_click.html create mode 100644 dom/events/test/test_text_event_in_content.html create mode 100644 dom/events/test/test_unbound_before_in_active_chain.html create mode 100644 dom/events/test/test_use_conflated_keypress_event_model_on_newer_Office_Online_Server.html create mode 100644 dom/events/test/test_use_split_keypress_event_model_on_old_Confluence.html create mode 100644 dom/events/test/test_use_split_keypress_event_model_on_old_Office_Online_Server.html create mode 100644 dom/events/test/test_wheel_default_action.html create mode 100644 dom/events/test/test_wheel_zoom_on_form_controls.html create mode 100644 dom/events/test/window_bug1369072.html create mode 100644 dom/events/test/window_bug1412775.xhtml create mode 100644 dom/events/test/window_bug1429572.html create mode 100644 dom/events/test/window_bug1447993.html create mode 100644 dom/events/test/window_bug493251.html create mode 100644 dom/events/test/window_bug617528.xhtml create mode 100644 dom/events/test/window_bug659071.html create mode 100644 dom/events/test/window_wheel_default_action.html (limited to 'dom/events/test') diff --git a/dom/events/test/.eslintrc.js b/dom/events/test/.eslintrc.js new file mode 100644 index 0000000000..317abe7b48 --- /dev/null +++ b/dom/events/test/.eslintrc.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = { + extends: [ + "plugin:mozilla/browser-test", + "plugin:mozilla/chrome-test", + "plugin:mozilla/mochitest-test", + ], +}; diff --git a/dom/events/test/browser.ini b/dom/events/test/browser.ini new file mode 100644 index 0000000000..86ecc36462 --- /dev/null +++ b/dom/events/test/browser.ini @@ -0,0 +1,17 @@ +[DEFAULT] + +[browser_alt_keyup_in_content.js] +skip-if = (os != 'linux' && os != 'win') || skip-if = !e10s + +[browser_beforeinput_by_execCommand_in_contentscript.js] +support-files = + file_beforeinput_by_execCommand_in_contentscript.html + ../../../browser/base/content/test/general/head.js + +[browser_bug1539497.js] +[browser_mouse_enterleave_switch_tab.js] +support-files = + ../../../browser/base/content/test/general/dummy_page.html + +[browser_shortcutkey_modifier_conflicts_with_content_accesskey_modifier.js] +skip-if = os != 'linux' && os != 'win' // Alt + D is defined only on Linux and Windows diff --git a/dom/events/test/browser_alt_keyup_in_content.js b/dom/events/test/browser_alt_keyup_in_content.js new file mode 100644 index 0000000000..e148800530 --- /dev/null +++ b/dom/events/test/browser_alt_keyup_in_content.js @@ -0,0 +1,321 @@ +"use strict"; + +const { ContentTaskUtils } = ChromeUtils.import( + "resource://testing-common/ContentTaskUtils.jsm" +); + +add_task(async function runTests() { + const menubar = document.getElementById("toolbar-menubar"); + const autohide = menubar.getAttribute("autohide"); + // This test requires that the window is active because of the limitation of + // menubar. Therefore, we should abort if the window becomes inactive during + // the tests. + let runningTests = true; + function onWindowActive(aEvent) { + // Don't warn after timed out. + if (runningTests && aEvent.target === window) { + info( + "WARNING: This window shouldn't have been inactivated during tests, but received an activated event!" + ); + } + } + function onWindowInactive(aEvent) { + // Don't warn after timed out. + if (runningTests && aEvent.target === window) { + info( + "WARNING: This window should be active during tests, but inactivated!" + ); + window.focus(); + } + } + let menubarActivated = false; + function onMenubarActive() { + menubarActivated = true; + } + // In this test, menu popups shouldn't be open, but this helps avoiding + // intermittent failure after inactivating the menubar. + let popupEvents = 0; + function getPopupInfo(aPopupEventTarget) { + return `<${ + aPopupEventTarget.nodeName + }${aPopupEventTarget.getAttribute("id") !== null ? ` id="${aPopupEventTarget.getAttribute("id")}"` : ""}>`; + } + function onPopupShown(aEvent) { + // Don't warn after timed out. + if (!runningTests) { + return; + } + popupEvents++; + info( + `A popup (${getPopupInfo( + aEvent.target + )}) is shown (visible popups: ${popupEvents})` + ); + } + function onPopupHidden(aEvent) { + // Don't warn after timed out. + if (!runningTests) { + return; + } + if (popupEvents === 0) { + info( + `WARNING: There are some unexpected popups which may be not cleaned up by the previous test (${getPopupInfo( + aEvent.target + )})` + ); + return; + } + popupEvents--; + info( + `A popup (${getPopupInfo( + aEvent.target + )}) is hidden (visible popups: ${popupEvents})` + ); + } + try { + Services.prefs.setBoolPref("ui.key.menuAccessKeyFocuses", true); + // If this fails, you need to replace "KEY_Alt" with a variable whose + // value is considered from the pref. + is( + Services.prefs.getIntPref("ui.key.menuAccessKey"), + 18, + "This test assumes that Alt key activates the menubar" + ); + window.addEventListener("activate", onWindowActive); + window.addEventListener("deactivate", onWindowInactive); + window.addEventListener("popupshown", onPopupShown); + window.addEventListener("popuphidden", onPopupHidden); + menubar.addEventListener("DOMMenuBarActive", onMenubarActive); + async function doTest(aTest) { + await new Promise(resolve => { + if (Services.focus.activeWindow === window) { + resolve(); + return; + } + info( + `${aTest.description}: The testing window is inactive, trying to activate it...` + ); + Services.focus.focusedWindow = window; + TestUtils.waitForCondition(() => { + if (Services.focus.activeWindow === window) { + resolve(); + return true; + } + Services.focus.focusedWindow = window; + return false; + }, `${aTest.description}: Waiting the window is activated`); + }); + info(`Start to test: ${aTest.description}...`); + + async function ensureMenubarInactive() { + if (!menubar.querySelector("[_moz-menuactive=true]")) { + return; + } + info(`${aTest.description}: Inactivating the menubar...`); + let waitForMenuBarInactive = BrowserTestUtils.waitForEvent( + menubar, + "DOMMenuBarInactive" + ); + EventUtils.synthesizeKey("KEY_Escape", {}, window); + await waitForMenuBarInactive; + await TestUtils.waitForCondition(() => { + return popupEvents === 0; + }, `${aTest.description}: Waiting for closing all popups`); + } + + try { + await BrowserTestUtils.withNewTab( + { + gBrowser, + url: aTest.url, + }, + async browser => { + info(`${aTest.description}: Waiting browser getting focus...`); + await SimpleTest.promiseFocus(browser); + await ensureMenubarInactive(); + menubarActivated = false; + + let keyupEventFiredInContent = false; + BrowserTestUtils.addContentEventListener( + browser, + "keyup", + () => { + keyupEventFiredInContent = true; + }, + { capture: true }, + event => { + return event.key === "Alt"; + } + ); + + // For making sure adding the above content event listener and + // it'll get `keyup` event, let's run `SpecialPowers.spawn` and + // wait for focus in the content process. + info( + `${aTest.description}: Waiting content process getting focus...` + ); + await SpecialPowers.spawn( + browser, + [aTest.description], + async aTestDescription => { + await ContentTaskUtils.waitForCondition(() => { + if ( + content.browsingContext.isActive && + content.document.hasFocus() + ) { + return true; + } + content.window.focus(); + return false; + }, `${aTestDescription}: Waiting for content gets focus in content process`); + } + ); + + let waitForAllKeyUpEventsInChrome = new Promise(resolve => { + // Wait 2 `keyup` events in the main process. First one is + // synthesized one. The other is replay event from content. + let firstKeyUpEvent; + window.addEventListener( + "keyup", + function onKeyUpInChrome(event) { + if (!firstKeyUpEvent) { + firstKeyUpEvent = event; + return; + } + window.removeEventListener("keyup", onKeyUpInChrome, { + capture: true, + }); + resolve(); + }, + { capture: true } + ); + }); + EventUtils.synthesizeKey("KEY_Alt", {}, window); + info( + `${aTest.description}: Waiting keyup events of Alt in chrome...` + ); + await waitForAllKeyUpEventsInChrome; + info(`${aTest.description}: Waiting keyup event in content...`); + try { + await TestUtils.waitForCondition(() => { + return keyupEventFiredInContent; + }, `${aTest.description}: Waiting for content gets focus in chrome process`); + } catch (ex) { + ok( + false, + `${aTest.description}: Failed to synthesize Alt key press in the content process` + ); + return; + } + + if (aTest.expectMenubarActive) { + ok( + menubarActivated, + `${aTest.description}: Menubar should've been activated by the synthesized Alt key press` + ); + } else { + // Wait some ticks to verify not receiving "DOMMenuBarActive" event. + // eslint-disable-next-line mozilla/no-arbitrary-setTimeout + await new Promise(resolve => setTimeout(resolve, 500)); + ok( + !menubarActivated, + `${aTest.description}: Menubar should not have been activated by the synthesized Alt key press` + ); + } + } + ); + } catch (ex) { + ok( + false, + `${aTest.description}: Thrown an exception: ${ex.toString()}` + ); + } finally { + await ensureMenubarInactive(); + info(`End testing: ${aTest.description}`); + } + } + + // Testcases for users who use collapsible menubar (by default) + menubar.setAttribute("autohide", "true"); + await doTest({ + description: "Testing menubar is shown by Alt keyup", + url: "data:text/html;charset=utf-8,

static page

", + expectMenubarActive: true, + }); + await doTest({ + description: + "Testing menubar is shown by Alt keyup when an has focus", + url: + "data:text/html;charset=utf-8," + + '', + expectMenubarActive: true, + }); + await doTest({ + description: + "Testing menubar is shown by Alt keyup when an editing host has focus", + url: + "data:text/html;charset=utf-8,

" + + '', + expectMenubarActive: true, + }); + await doTest({ + description: + "Testing menubar won't be shown by Alt keyup due to suppressed by the page", + url: + "data:text/html;charset=utf-8,

dynamic page

" + + '', + expectMenubarActive: false, + }); + + // Testcases for users who always show the menubar. + menubar.setAttribute("autohide", "false"); + await doTest({ + description: "Testing menubar is activated by Alt keyup", + url: "data:text/html;charset=utf-8,

static page

", + expectMenubarActive: true, + }); + await doTest({ + description: + "Testing menubar is activated by Alt keyup when an has focus", + url: + "data:text/html;charset=utf-8," + + '', + expectMenubarActive: true, + }); + await doTest({ + description: + "Testing menubar is activated by Alt keyup when an editing host has focus", + url: + "data:text/html;charset=utf-8,

" + + '', + expectMenubarActive: true, + }); + await doTest({ + description: + "Testing menubar won't be activated by Alt keyup due to suppressed by the page", + url: + "data:text/html;charset=utf-8,

dynamic page

" + + '', + expectMenubarActive: false, + }); + runningTests = false; + } catch (ex) { + ok( + false, + `Aborting this test due to unexpected the exception (${ex.toString()})` + ); + runningTests = false; + } finally { + if (autohide !== null) { + menubar.setAttribute("autohide", autohide); + } else { + menubar.removeAttribute("autohide"); + } + Services.prefs.clearUserPref("ui.key.menuAccessKeyFocuses"); + menubar.removeEventListener("DOMMenuBarActive", onMenubarActive); + window.removeEventListener("activate", onWindowActive); + window.removeEventListener("deactivate", onWindowInactive); + window.removeEventListener("popupshown", onPopupShown); + window.removeEventListener("popuphidden", onPopupHidden); + } +}); diff --git a/dom/events/test/browser_beforeinput_by_execCommand_in_contentscript.js b/dom/events/test/browser_beforeinput_by_execCommand_in_contentscript.js new file mode 100644 index 0000000000..f7b91bf27c --- /dev/null +++ b/dom/events/test/browser_beforeinput_by_execCommand_in_contentscript.js @@ -0,0 +1,108 @@ +"use strict"; + +async function installAndStartExtension() { + function contentScript() { + window.addEventListener("keydown", aEvent => { + console.log("keydown event is fired"); + if (aEvent.defaultPrevented) { + return; + } + let selection = window.getSelection(); + if (selection.isCollapsed) { + return; + } + if (aEvent.ctrlKey && aEvent.key === "k") { + document.execCommand("createLink", false, "http://example.com/"); + aEvent.preventDefault(); + } + }); + } + + let extension = ExtensionTestUtils.loadExtension({ + manifest: { + content_scripts: [ + { + js: ["content_script.js"], + matches: [""], + run_at: "document_start", + }, + ], + }, + files: { + "content_script.js": contentScript, + }, + }); + + await extension.startup(); + + return extension; +} + +add_task(async function() { + await pushPrefs(["dom.input_events.beforeinput.enabled", true]); + + const extension = await installAndStartExtension(); + const tab = await BrowserTestUtils.openNewForegroundTab( + gBrowser, + "http://example.com/browser/dom/events/test/file_beforeinput_by_execCommand_in_contentscript.html", + true + ); + + function runTest() { + var editor = content.document.querySelector("[contenteditable]"); + editor.focus(); + content.document.getSelection().selectAllChildren(editor); + var beforeinput; + editor.addEventListener("beforeinput", aEvent => { + beforeinput = aEvent; + }); + editor.addEventListener("input", aEvent => { + if (!beforeinput) { + sendAsyncMessage("Test:BeforeInputInContentEditable", { + succeeded: false, + message: "No beforeinput event is fired", + }); + return; + } + sendAsyncMessage("Test:BeforeInputInContentEditable", { + succeeded: + editor.innerHTML === 'abcdef', + message: `editor.innerHTML=${editor.innerHTML}`, + }); + }); + } + + try { + tab.linkedBrowser.messageManager.loadFrameScript( + "data:,(" + runTest.toString() + ")();", + false + ); + + let received = false; + let testResult = new Promise(resolve => { + let mm = tab.linkedBrowser.messageManager; + mm.addMessageListener( + "Test:BeforeInputInContentEditable", + function onFinish(aMsg) { + mm.removeMessageListener( + "Test:BeforeInputInContentEditable", + onFinish + ); + is(aMsg.data.succeeded, true, aMsg.data.message); + resolve(); + } + ); + }); + info("Sending Ctrl+K..."); + await BrowserTestUtils.synthesizeKey( + "k", + { ctrlKey: true }, + tab.linkedBrowser + ); + info("Waiting test result..."); + await testResult; + } finally { + BrowserTestUtils.removeTab(tab); + await extension.unload(); + } +}); diff --git a/dom/events/test/browser_bug1539497.js b/dom/events/test/browser_bug1539497.js new file mode 100644 index 0000000000..e52ec100e3 --- /dev/null +++ b/dom/events/test/browser_bug1539497.js @@ -0,0 +1,28 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +add_task(async function maxTouchPoints() { + await new Promise(resolve => { + SpecialPowers.pushPrefEnv( + { + set: [ + ["dom.w3c_pointer_events.enabled", true], + ["dom.maxtouchpoints.testing.value", 5], + ], + }, + resolve + ); + }); + + let tab = await BrowserTestUtils.openNewForegroundTab( + gBrowser, + "data:text/html,Test page for navigator.maxTouchPoints" + ); + await SpecialPowers.spawn(tab.linkedBrowser, [], function() { + is(content.navigator.maxTouchPoints, 5, "Should have touch points."); + }); + + BrowserTestUtils.removeTab(tab); +}); diff --git a/dom/events/test/browser_mouse_enterleave_switch_tab.js b/dom/events/test/browser_mouse_enterleave_switch_tab.js new file mode 100644 index 0000000000..91f127f34c --- /dev/null +++ b/dom/events/test/browser_mouse_enterleave_switch_tab.js @@ -0,0 +1,158 @@ +"use strict"; + +async function synthesizeMouseAndWait(aBrowser, aEvent) { + let promise = SpecialPowers.spawn(aBrowser, [aEvent], async event => { + await new Promise(resolve => { + content.document.documentElement.addEventListener(event, resolve, { + once: true, + }); + }); + }); + // Ensure content has been added event listener. + await SpecialPowers.spawn(aBrowser, [], () => {}); + EventUtils.synthesizeMouse(aBrowser, 10, 10, { type: aEvent }); + return promise; +} + +function AddMouseEventListener(aBrowser) { + return SpecialPowers.spawn(aBrowser, [], () => { + content.catchedEvents = []; + let listener = function(aEvent) { + content.catchedEvents.push(aEvent.type); + }; + + let target = content.document.querySelector("p"); + target.onmouseenter = listener; + target.onmouseleave = listener; + }); +} + +function clearMouseEventListenerAndCheck(aBrowser, aExpectedEvents) { + return SpecialPowers.spawn(aBrowser, [aExpectedEvents], events => { + let target = content.document.querySelector("p"); + target.onmouseenter = null; + target.onmouseleave = null; + + Assert.deepEqual(content.catchedEvents, events); + }); +} + +add_task(async function testSwitchTabs() { + const tabFirst = await BrowserTestUtils.openNewForegroundTab( + gBrowser, + "http://example.com/browser/browser/base/content/test/general/dummy_page.html", + true + ); + + info("Initial mouse move"); + await EventUtils.synthesizeAndWaitNativeMouseMove( + tabFirst.linkedBrowser, + 10, + 10 + ); + + info("Open and move to a new tab"); + await AddMouseEventListener(tabFirst.linkedBrowser); + const tabSecond = await BrowserTestUtils.openNewForegroundTab( + gBrowser, + "http://example.com/browser/browser/base/content/test/general/dummy_page.html" + ); + // Synthesize a mousemove to generate corresponding mouseenter and mouseleave + // events. + await EventUtils.synthesizeAndWaitNativeMouseMove( + tabSecond.linkedBrowser, + 10, + 10 + ); + // Wait a bit to see if there is any unexpected mouse event. + await TestUtils.waitForTick(); + await clearMouseEventListenerAndCheck(tabFirst.linkedBrowser, ["mouseleave"]); + + info("switch back to the previous tab"); + await AddMouseEventListener(tabFirst.linkedBrowser); + await AddMouseEventListener(tabSecond.linkedBrowser); + await BrowserTestUtils.switchTab(gBrowser, tabFirst); + // Synthesize a mousemove to generate corresponding mouseenter and mouseleave + // events. + await EventUtils.synthesizeAndWaitNativeMouseMove( + tabFirst.linkedBrowser, + 10, + 10 + ); + // Wait a bit to see if there is any unexpected mouse event. + await TestUtils.waitForTick(); + await clearMouseEventListenerAndCheck(tabFirst.linkedBrowser, ["mouseenter"]); + await clearMouseEventListenerAndCheck(tabSecond.linkedBrowser, [ + "mouseleave", + ]); + + info("Close tabs"); + BrowserTestUtils.removeTab(tabFirst); + BrowserTestUtils.removeTab(tabSecond); +}); + +add_task(async function testSwitchTabsWithMouseDown() { + const tabFirst = await BrowserTestUtils.openNewForegroundTab( + gBrowser, + "http://example.com/browser/browser/base/content/test/general/dummy_page.html", + true + ); + + info("Initial mouse move"); + await EventUtils.synthesizeAndWaitNativeMouseMove( + tabFirst.linkedBrowser, + 10, + 10 + ); + + info("mouse down"); + await synthesizeMouseAndWait(tabFirst.linkedBrowser, "mousedown"); + + info("Open and move to a new tab"); + await AddMouseEventListener(tabFirst.linkedBrowser); + const tabSecond = await BrowserTestUtils.openNewForegroundTab( + gBrowser, + "http://example.com/browser/browser/base/content/test/general/dummy_page.html" + ); + // Synthesize a mousemove to generate corresponding mouseenter and mouseleave + // events. + await EventUtils.synthesizeAndWaitNativeMouseMove( + tabSecond.linkedBrowser, + 10, + 10 + ); + + info("mouse up"); + await synthesizeMouseAndWait(tabSecond.linkedBrowser, "mouseup"); + // Wait a bit to see if there is any unexpected mouse event. + await TestUtils.waitForTick(); + await clearMouseEventListenerAndCheck(tabFirst.linkedBrowser, ["mouseleave"]); + + info("mouse down"); + await synthesizeMouseAndWait(tabSecond.linkedBrowser, "mousedown"); + + info("switch back to the previous tab"); + await AddMouseEventListener(tabFirst.linkedBrowser); + await AddMouseEventListener(tabSecond.linkedBrowser); + await BrowserTestUtils.switchTab(gBrowser, tabFirst); + // Synthesize a mousemove to generate corresponding mouseenter and mouseleave + // events. + await EventUtils.synthesizeAndWaitNativeMouseMove( + tabFirst.linkedBrowser, + 10, + 10 + ); + + info("mouse up"); + await synthesizeMouseAndWait(tabFirst.linkedBrowser, "mouseup"); + // Wait a bit to see if there is any unexpected mouse event. + await TestUtils.waitForTick(); + await clearMouseEventListenerAndCheck(tabFirst.linkedBrowser, ["mouseenter"]); + await clearMouseEventListenerAndCheck(tabSecond.linkedBrowser, [ + "mouseleave", + ]); + + info("Close tabs"); + BrowserTestUtils.removeTab(tabFirst); + BrowserTestUtils.removeTab(tabSecond); +}); diff --git a/dom/events/test/browser_shortcutkey_modifier_conflicts_with_content_accesskey_modifier.js b/dom/events/test/browser_shortcutkey_modifier_conflicts_with_content_accesskey_modifier.js new file mode 100644 index 0000000000..67fa3c36eb --- /dev/null +++ b/dom/events/test/browser_shortcutkey_modifier_conflicts_with_content_accesskey_modifier.js @@ -0,0 +1,102 @@ +add_task(async function() { + // Even if modifier of a shortcut key same as modifier of content access key, + // the shortcut key should be executed if (remote) content doesn't handle it. + // This test uses existing shortcut key declaration on Linux and Windows. + // If you remove or change Alt + D, you need to keep check this with changing + // the pref or result check. + + await new Promise(resolve => { + SpecialPowers.pushPrefEnv( + { + set: [ + ["ui.key.generalAccessKey", -1], + ["ui.key.chromeAccess", 0 /* disabled */], + ["ui.key.contentAccess", 4 /* Alt */], + ["browser.search.widget.inNavBar", true], + ], + }, + resolve + ); + }); + + const kTestPage = "data:text/html,simple web page"; + let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, kTestPage); + + let searchBar = BrowserSearch.searchBar; + searchBar.focus(); + + function promiseURLBarHasFocus() { + return new Promise(resolve => { + if (gURLBar.focused) { + ok(true, "The URL bar already has focus"); + resolve(); + return; + } + info("Waiting focus event..."); + gURLBar.addEventListener( + "focus", + () => { + ok(true, "The URL bar gets focus"); + resolve(); + }, + { once: true } + ); + }); + } + + function promiseURLBarSelectsAllText() { + return new Promise(resolve => { + function isAllTextSelected() { + return ( + gURLBar.inputField.selectionStart === 0 && + gURLBar.inputField.selectionEnd === gURLBar.inputField.value.length + ); + } + if (isAllTextSelected()) { + ok(true, "All text of the URL bar is already selected"); + isnot( + gURLBar.inputField.value, + "", + "The URL bar should have non-empty text" + ); + resolve(); + return; + } + info("Waiting selection changes..."); + function tryToCheckItLater() { + if (!isAllTextSelected()) { + SimpleTest.executeSoon(tryToCheckItLater); + return; + } + ok(true, "All text of the URL bar should be selected"); + isnot( + gURLBar.inputField.value, + "", + "The URL bar should have non-empty text" + ); + resolve(); + } + SimpleTest.executeSoon(tryToCheckItLater); + }); + } + + // Alt + D is a shortcut key to move focus to the URL bar and selects its text. + info("Pressing Alt + D in the search bar..."); + EventUtils.synthesizeKey("d", { altKey: true }); + + await promiseURLBarHasFocus(); + await promiseURLBarSelectsAllText(); + + // Alt + D in the URL bar should select all text in it. + await gURLBar.focus(); + await promiseURLBarHasFocus(); + gURLBar.inputField.selectionStart = gURLBar.inputField.selectionEnd = + gURLBar.inputField.value.length; + + info("Pressing Alt + D in the URL bar..."); + EventUtils.synthesizeKey("d", { altKey: true }); + await promiseURLBarHasFocus(); + await promiseURLBarSelectsAllText(); + + gBrowser.removeCurrentTab(); +}); diff --git a/dom/events/test/bug1017086_inner.html b/dom/events/test/bug1017086_inner.html new file mode 100644 index 0000000000..10e7f4d555 --- /dev/null +++ b/dom/events/test/bug1017086_inner.html @@ -0,0 +1,41 @@ + + + + + + Test for Bug 1017086 + + + + + + + Mozilla Bug 1017086 +

+ +
+  
+ + diff --git a/dom/events/test/bug226361_iframe.xhtml b/dom/events/test/bug226361_iframe.xhtml new file mode 100644 index 0000000000..df38a8bcbe --- /dev/null +++ b/dom/events/test/bug226361_iframe.xhtml @@ -0,0 +1,47 @@ + + + + Test for Bug 226361 + + +

+ +This is the 1st + +link but the 3rd tabindex
+ +
+ + This is the 2nd + +link but the 4th tabindex
+ +
+ + This is the 3rd + +link but the 1st tabindex
+ +
+ + This is the 4th + +link but the 5th tabindex
+ +
+ + This is the 5th + +link but the 2nd tabindex + +

+ +
+
+
+ + diff --git a/dom/events/test/bug299673.js b/dom/events/test/bug299673.js new file mode 100644 index 0000000000..07e33bd137 --- /dev/null +++ b/dom/events/test/bug299673.js @@ -0,0 +1,150 @@ +var popup; + +function OpenWindow() { + log({}, ">>> OpenWindow"); + popup = window.open("", "Test"); + + var output = ""; + + output += ""; + output += "
"; + output += + ""; + output += "
"; + output += ""; + output += ""; + + popup.document.open(); + popup.document.write(output); + popup.document.close(); + + popup.document.onclick = function(event) { + log(event, "popup-doc"); + }; + popup.document.onfocus = function(event) { + log(event, "popup-doc"); + }; + popup.document.onblur = function(event) { + log(event, "popup-doc"); + }; + popup.document.onchange = function(event) { + log(event, "popup-doc"); + }; + + var e = popup.document.getElementById("popupText1"); + popup.focus(); + e.focus(); + is( + popup.document.activeElement, + e, + "input element in popup should be focused" + ); + log({}, "<<< OpenWindow"); +} + +var result; + +function log(event, message) { + if (event && event.eventPhase == 3) { + return; + } + e = event.currentTarget || event.target || event.srcElement; + var id = e ? (e.id ? e.id : e.name ? e.name : e.value ? e.value : "") : ""; + if (id) { + id = "(" + id + ")"; + } + result += + (e ? (e.tagName ? e.tagName : "") : " ") + + id + + ": " + + (event.type ? event.type : "") + + " " + + (message ? message : "") + + "\n"; +} + +document.onclick = function(event) { + log(event, "top-doc"); +}; +document.onfocus = function(event) { + log(event, "top-doc"); +}; +document.onblur = function(event) { + log(event, "top-doc"); +}; +document.onchange = function(event) { + log(event, "top-doc"); +}; + +function doTest1_rest2(expectedEventLog, focusAfterCloseId) { + try { + is( + document.activeElement, + document.getElementById(focusAfterCloseId), + "wrong element is focused after popup was closed" + ); + is(result, expectedEventLog, "unexpected events"); + SimpleTest.finish(); + } catch (e) { + if (popup) { + popup.close(); + } + throw e; + } +} +function doTest1_rest1(expectedEventLog, focusAfterCloseId) { + try { + synthesizeKey("V", {}, popup); + synthesizeKey("A", {}, popup); + synthesizeKey("L", {}, popup); + is( + popup.document.getElementById("popupText1").value, + "VAL", + "input element in popup did not accept input" + ); + + var p = popup; + popup = null; + p.close(); + + SimpleTest.waitForFocus(function() { + doTest1_rest2(expectedEventLog, focusAfterCloseId); + }, window); + } catch (e) { + if (popup) { + popup.close(); + } + throw e; + } +} + +function doTest1(expectedEventLog, focusAfterCloseId) { + try { + var select1 = document.getElementById("Select1"); + select1.focus(); + is(document.activeElement, select1, "select element should be focused"); + synthesizeKey("KEY_ArrowDown"); + synthesizeKey("KEY_Tab"); + SimpleTest.waitForFocus(function() { + doTest1_rest1(expectedEventLog, focusAfterCloseId); + }, popup); + } catch (e) { + if (popup) { + popup.close(); + } + throw e; + } +} + +function setPrefAndDoTest(expectedEventLog, focusAfterCloseId, prefValue) { + var select1 = document.getElementById("Select1"); + select1.blur(); + result = ""; + log({}, "Test with browser.link.open_newwindow = " + prefValue); + SpecialPowers.pushPrefEnv( + { set: [["browser.link.open_newwindow", prefValue]] }, + function() { + doTest1(expectedEventLog, focusAfterCloseId); + } + ); +} diff --git a/dom/events/test/bug322588-popup.html b/dom/events/test/bug322588-popup.html new file mode 100644 index 0000000000..767eb9db9c --- /dev/null +++ b/dom/events/test/bug322588-popup.html @@ -0,0 +1 @@ +a id=target diff --git a/dom/events/test/bug415498-doc1.html b/dom/events/test/bug415498-doc1.html new file mode 100644 index 0000000000..e8fbca6c9a --- /dev/null +++ b/dom/events/test/bug415498-doc1.html @@ -0,0 +1,15 @@ + + + + + + + Testcase for bug 415498. This page should show an exception in Error Console on load + diff --git a/dom/events/test/bug415498-doc2.html b/dom/events/test/bug415498-doc2.html new file mode 100644 index 0000000000..e556a4e4ca --- /dev/null +++ b/dom/events/test/bug415498-doc2.html @@ -0,0 +1,15 @@ + + + + + + + Testcase for bug 415498. This page should show an exception in Error Console on load + diff --git a/dom/events/test/bug418986-3.js b/dom/events/test/bug418986-3.js new file mode 100644 index 0000000000..cc3687c0d0 --- /dev/null +++ b/dom/events/test/bug418986-3.js @@ -0,0 +1,83 @@ +SimpleTest.waitForExplicitFinish(); + +// The main testing function. +var test = function(isContent) { + // Each definition is [eventType, prefSetting] + // Where we are setting the "privacy.resistFingerprinting" pref. + let eventDefs = [ + ["mousedown", true], + ["mouseup", true], + ["mousedown", false], + ["mouseup", false], + ]; + + let testCounter = 0; + + // Declare ahead of time. + let setup; + + // This function is called when the event handler fires. + let handleEvent = function(event, prefVal) { + let resisting = prefVal && isContent; + if (resisting) { + is( + event.screenX, + event.clientX, + "event.screenX and event.clientX should be the same" + ); + is( + event.screenY, + event.clientY, + "event.screenY and event.clientY should be the same" + ); + } else { + // We can't be sure about X coordinates not being equal, but we can test Y. + isnot(event.screenY, event.clientY, "event.screenY !== event.clientY"); + } + ++testCounter; + if (testCounter < eventDefs.length) { + nextTest(); + } else { + SimpleTest.finish(); + } + }; + + // In this function, we set up the nth div and event handler, + // and then synthesize a mouse event in the div, to test + // whether the resulting events resist fingerprinting by + // suppressing absolute screen coordinates. + nextTest = function() { + let [eventType, prefVal] = eventDefs[testCounter]; + SpecialPowers.pushPrefEnv( + { set: [["privacy.resistFingerprinting", prefVal]] }, + function() { + // The following code creates a new div for each event in eventDefs, + // attaches a listener to listen for the event, and then generates + // a fake event at the center of the div. + let div = document.createElementNS( + "http://www.w3.org/1999/xhtml", + "div" + ); + div.style.width = "10px"; + div.style.height = "10px"; + div.style.backgroundColor = "red"; + // Name the div after the event we're listening for. + div.id = eventType; + document.getElementById("body").appendChild(div); + // Seems we can't add an event listener in chrome unless we run + // it in a later task. + window.setTimeout(function() { + div.addEventListener(eventType, event => handleEvent(event, prefVal)); + // For some reason, the following synthesizeMouseAtCenter call only seems to run if we + // wrap it in a window.setTimeout(..., 0). + window.setTimeout(function() { + synthesizeMouseAtCenter(div, { type: eventType }); + }, 0); + }, 0); + } + ); + }; + + // Now run by starting with the 0th event. + nextTest(); +}; diff --git a/dom/events/test/bug426082.html b/dom/events/test/bug426082.html new file mode 100644 index 0000000000..b8bf5cb243 --- /dev/null +++ b/dom/events/test/bug426082.html @@ -0,0 +1,116 @@ + + + + + Test for Bug 426082 + + + + + +Mozilla Bug 426082 +

+ +

+

+

Something under the label

+
+
+
+ + diff --git a/dom/events/test/bug545268.html b/dom/events/test/bug545268.html new file mode 100644 index 0000000000..1f90149a54 --- /dev/null +++ b/dom/events/test/bug545268.html @@ -0,0 +1 @@ + + diff --git a/dom/events/test/file_mouse_enterleave.html b/dom/events/test/file_mouse_enterleave.html new file mode 100644 index 0000000000..9e3d1f1d8b --- /dev/null +++ b/dom/events/test/file_mouse_enterleave.html @@ -0,0 +1,40 @@ + + + +
+
+ + + diff --git a/dom/events/test/mochitest.ini b/dom/events/test/mochitest.ini new file mode 100644 index 0000000000..4f5731d8f9 --- /dev/null +++ b/dom/events/test/mochitest.ini @@ -0,0 +1,251 @@ +[DEFAULT] +# Skip migration work in BG__migrateUI for browser_startup.js since it increases +# the occurrence of the leak reported in bug 1398563 with test_bug1327798.html. +# Run the font-loader eagerly to minimize the risk that font list finalization +# may disrupt the events received or result in a timeout. +prefs = + browser.migration.version=9999999 + gfx.font_loader.delay=0 +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +support-files = + bug226361_iframe.xhtml + bug299673.js + bug322588-popup.html + bug426082.html + bug545268.html + bug574663.html + bug607464.html + bug656379-1.html + bug418986-3.js + error_event_worker.js + empty.js + event_leak_utils.js + window_bug493251.html + window_bug659071.html + window_wheel_default_action.html + !/gfx/layers/apz/test/mochitest/apz_test_utils.js + +[test_accel_virtual_modifier.html] +[test_addEventListenerExtraArg.html] +[test_all_synthetic_events.html] +[test_bug1518442.html] +[test_bug1539497.html] +[test_bug1686716.html] +[test_bug226361.xhtml] +[test_bug238987.html] +[test_bug288392.html] +[test_bug299673-1.html] +[test_bug1037990.html] +[test_bug299673-2.html] +[test_bug322588.html] +[test_bug328885.html] +[test_bug336682_1.html] +support-files = test_bug336682.js +[test_bug367781.html] +[test_bug379120.html] +[test_bug402089.html] +[test_bug405632.html] +[test_bug409604.html] +skip-if = toolkit == 'android' #TIMED_OUT +[test_bug412567.html] +[test_bug418986-3.html] +[test_bug422132.html] +[test_bug426082.html] +[test_bug427537.html] +[test_bug428988.html] +[test_bug432698.html] +[test_bug443985.html] +skip-if = verify +[test_bug447736.html] +[test_bug448602.html] +[test_bug450876.html] +skip-if = verify +[test_bug456273.html] +[test_bug457672.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug489671.html] +[test_bug493251.html] +[test_bug508479.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM # drag event fails +[test_bug517851.html] +[test_bug534833.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug545268.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug547996-1.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug547996-2.xhtml] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug556493.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug563329.html] +skip-if = true # Disabled due to timeouts. +[test_bug574663.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug591815.html] +[test_bug593959.html] +[test_bug603008.html] +skip-if = toolkit == 'android' +[test_bug605242.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug607464.html] +skip-if = toolkit == 'android' || e10s #CRASH_DUMP, RANDOM, bug 1400586 +[test_bug613634.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug615597.html] +[test_bug624127.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug635465.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug641477.html] +[test_bug648573.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug650493.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug656379-1.html] +skip-if = toolkit == 'android' +[test_bug656379-2.html] +skip-if = toolkit == 'android' || (verify && (os == 'linux')) #CRASH_DUMP, RANDOM +[test_bug656954.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug659071.html] +[test_bug659350.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug662678.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug667612.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug667919-1.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug684208.html] +[test_bug689564.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug698929.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_bug704423.html] +[test_bug741666.html] +[test_coalesce_touchmove.html] +support-files = file_coalesce_touchmove.html +skip-if = debug #In order to be able to test touchmoves, the test needs to synthesize touchstart in a way which asserts +[test_deviceSensor.html] +[test_bug812744.html] +[test_bug822898.html] +[test_bug855741.html] +[test_bug864040.html] +[test_bug924087.html] +[test_bug930374-content.html] +[test_bug944011.html] +[test_bug944847.html] +[test_bug946632.html] +[test_bug967796.html] +[test_bug985988.html] +[test_bug998809.html] +[test_bug1003432.html] +support-files = test_bug1003432.js +[test_bug1013412.html] +skip-if = (verify && debug && (os == 'linux' || os == 'win')) +[test_bug1017086_disable.html] +support-files = bug1017086_inner.html +[test_bug1017086_enable.html] +support-files = bug1017086_inner.html +[test_bug1079236.html] +[test_bug1127588.html] +[test_bug1145910.html] +[test_bug1150308.html] +[test_bug1248459.html] +[test_bug1264380.html] +[test_bug1327798.html] +skip-if = headless +[test_click_on_reframed_generated_text.html] +[test_click_on_restyled_element.html] +[test_clickevent_on_input.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_continuous_wheel_events.html] +skip-if = (verify && debug && (os == 'linux' || os == 'win')) +[test_dblclick_explicit_original_target.html] +[test_dom_activate_event.html] +[test_dom_keyboard_event.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_dom_mouse_event.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_dom_storage_event.html] +[test_dom_wheel_event.html] +[test_draggableprop.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_dragstart.html] +[test_error_events.html] +skip-if = toolkit == 'android' #TIMED_OUT +[test_event_handler_cc.html] +[test_eventctors.html] +skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM +[test_eventctors_sensors.html] +[test_disabled_events.html] +[test_event_screenXY_in_cross_origin_iframe.html] +support-files = + file_event_screenXY.html + !/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js +[test_eventhandler_scoping.html] +[test_eventTimeStamp.html] +[test_focus_abspos.html] +[test_legacy_event.html] +[test_legacy_non-primary_click.html] +[test_legacy_touch_api.html] +[test_messageEvent.html] +[test_messageEvent_init.html] +[test_mouse_enterleave_iframe.html] +support-files = + file_mouse_enterleave.html +[test_mouse_capture_iframe.html] +support-files = + file_empty.html +[test_moz_mouse_pixel_scroll_event.html] +[test_offsetxy.html] +[test_onerror_handler_args.html] +[test_passive_listeners.html] +[test_paste_image.html] +skip-if = headless # Bug 1405869 +[test_text_event_in_content.html] +[test_use_conflated_keypress_event_model_on_newer_Office_Online_Server.html] +[test_use_split_keypress_event_model_on_old_Confluence.html] +skip-if = !debug # The mode change event is available only on debug build +[test_use_split_keypress_event_model_on_old_Office_Online_Server.html] +skip-if = !debug # The mode change event is available only on debug build +[test_wheel_default_action.html] +skip-if = os == 'linux' +[test_bug687787.html] +[test_bug1305458.html] +[test_bug1298970.html] +[test_bug1304044.html] +[test_bug1332699.html] +[test_bug1339758.html] +[test_bug1369072.html] +support-files = window_bug1369072.html +skip-if = toolkit == 'android' +[test_bug1429572.html] +support-files = window_bug1429572.html +[test_bug1446834.html] +support-files = file_bug1446834.html +[test_bug1447993.html] +support-files = window_bug1447993.html +skip-if = toolkit == 'android' +[test_bug1484371.html] +support-files = file_bug1484371.html +[test_bug1534562.html] +skip-if = toolkit == 'android' # Bug 1312791 +[test_bug1581192.html] +[test_bug1673434.html] +[test_dnd_with_modifiers.html] +[test_hover_mouseleave.html] +[test_marquee_events.html] +[test_slotted_mouse_event.html] +[test_slotted_text_click.html] +[test_unbound_before_in_active_chain.html] +[test_wheel_zoom_on_form_controls.html] +skip-if = verify +[test_focus_blur_on_click_in_cross_origin_iframe.html] +support-files = + file_focus_blur_on_click_in_cross_origin_iframe.html +[test_focus_blur_on_click_in_deep_cross_origin_iframe.html] +support-files = + file_focus_blur_on_click_in_deep_cross_origin_iframe_inner.html + file_focus_blur_on_click_in_deep_cross_origin_iframe_middle.html diff --git a/dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_1.html b/dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_1.html new file mode 100644 index 0000000000..55c4e3cad5 --- /dev/null +++ b/dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_1.html @@ -0,0 +1,63 @@ + + + + Pointer Events properties tests + + + + + + + + + +

Pointer Events tests

+
+
+
+

The following pointer types were detected: .

+

Refresh the page to run the tests again with a different pointer type.

+
+
+ + diff --git a/dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_2.html b/dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_2.html new file mode 100644 index 0000000000..a533429acb --- /dev/null +++ b/dom/events/test/pointerevents/bug1293174_implicit_pointer_capture_for_touch_2.html @@ -0,0 +1,64 @@ + + + + Pointer Events properties tests + + + + + + + + + +

Pointer Events tests

+
+
+
+

The following pointer types were detected: .

+

Refresh the page to run the tests again with a different pointer type.

+
+
+ + diff --git a/dom/events/test/pointerevents/bug_1420589_iframe1.html b/dom/events/test/pointerevents/bug_1420589_iframe1.html new file mode 100644 index 0000000000..b18d808b84 --- /dev/null +++ b/dom/events/test/pointerevents/bug_1420589_iframe1.html @@ -0,0 +1,17 @@ + + + diff --git a/dom/events/test/pointerevents/bug_1420589_iframe2.html b/dom/events/test/pointerevents/bug_1420589_iframe2.html new file mode 100644 index 0000000000..75aea1d187 --- /dev/null +++ b/dom/events/test/pointerevents/bug_1420589_iframe2.html @@ -0,0 +1,17 @@ + + + diff --git a/dom/events/test/pointerevents/file_pointercapture_xorigin_iframe.html b/dom/events/test/pointerevents/file_pointercapture_xorigin_iframe.html new file mode 100644 index 0000000000..88690748e5 --- /dev/null +++ b/dom/events/test/pointerevents/file_pointercapture_xorigin_iframe.html @@ -0,0 +1,62 @@ + + + + +Bug 1671849 + + + + + + + +Mozilla Bug 1671849 +
+ + +
+
+
+ + diff --git a/dom/events/test/pointerevents/file_pointercapture_xorigin_iframe_pointerlock.html b/dom/events/test/pointerevents/file_pointercapture_xorigin_iframe_pointerlock.html new file mode 100644 index 0000000000..12174da197 --- /dev/null +++ b/dom/events/test/pointerevents/file_pointercapture_xorigin_iframe_pointerlock.html @@ -0,0 +1,111 @@ + + + + +Bug 1671849 + + + + + + + +Mozilla Bug 1671849 +
+ + +
+
+
+ + diff --git a/dom/events/test/pointerevents/file_test_trigger_fullscreen.html b/dom/events/test/pointerevents/file_test_trigger_fullscreen.html new file mode 100644 index 0000000000..2d6549ede7 --- /dev/null +++ b/dom/events/test/pointerevents/file_test_trigger_fullscreen.html @@ -0,0 +1 @@ +
diff --git a/dom/events/test/pointerevents/iframe.html b/dom/events/test/pointerevents/iframe.html new file mode 100644 index 0000000000..0e3eac19b9 --- /dev/null +++ b/dom/events/test/pointerevents/iframe.html @@ -0,0 +1,7 @@ + + + + +
+ + diff --git a/dom/events/test/pointerevents/mochitest.ini b/dom/events/test/pointerevents/mochitest.ini new file mode 100644 index 0000000000..7f44b3cbae --- /dev/null +++ b/dom/events/test/pointerevents/mochitest.ini @@ -0,0 +1,116 @@ +[DEFAULT] +support-files = + iframe.html + mochitest_support_external.js + mochitest_support_internal.js + wpt/pointerevent_styles.css + wpt/pointerevent_support.js + pointerevent_utils.js + !/gfx/layers/apz/test/mochitest/apz_test_utils.js + +[test_bug1285128.html] +[test_bug1293174_implicit_pointer_capture_for_touch_1.html] +support-files = bug1293174_implicit_pointer_capture_for_touch_1.html +[test_bug1293174_implicit_pointer_capture_for_touch_2.html] +support-files = bug1293174_implicit_pointer_capture_for_touch_2.html +[test_bug1303704.html] +[test_bug1315862.html] +[test_bug1323158.html] +[test_bug1403055.html] +[test_bug1420589_1.html] +support-files = + bug_1420589_iframe1.html + bug_1420589_iframe2.html +[test_bug1420589_2.html] +support-files = + bug_1420589_iframe1.html +[test_bug1420589_3.html] +support-files = + bug_1420589_iframe1.html +[test_multiple_touches.html] +[test_wpt_pointerevent_attributes_hoverable_pointers-manual.html] +support-files = + wpt/pointerevent_attributes_hoverable_pointers-manual.html + wpt/resources/pointerevent_attributes_hoverable_pointers-iframe.html +[test_wpt_pointerevent_attributes_nohover_pointers-manual.html] +support-files = + wpt/pointerevent_attributes_nohover_pointers-manual.html + wpt/resources/pointerevent_attributes_hoverable_pointers-iframe.html +[test_wpt_pointerevent_boundary_events_in_capturing-manual.html] +support-files = wpt/pointerevent_boundary_events_in_capturing-manual.html +[test_wpt_pointerevent_change-touch-action-onpointerdown_touch-manual.html] +support-files = wpt/pointerevent_change-touch-action-onpointerdown_touch-manual.html +disabled = disabled +[test_wpt_pointerevent_constructor.html] +support-files = wpt/pointerevent_constructor.html +[test_wpt_pointerevent_multiple_primary_pointers_boundary_events-manual.html] +support-files = wpt/pointerevent_multiple_primary_pointers_boundary_events-manual.html +disabled = should be investigated +[test_wpt_pointerevent_pointercancel_touch-manual.html] +support-files = wpt/pointerevent_pointercancel_touch-manual.html +[test_wpt_pointerevent_pointerId_scope-manual.html] +support-files = wpt/resources/pointerevent_pointerId_scope-iframe.html +disabled = should be investigated +[test_wpt_pointerevent_pointerleave_after_pointercancel_touch-manual.html] +support-files = wpt/pointerevent_pointerleave_after_pointercancel_touch-manual.html +[test_wpt_pointerevent_pointerleave_pen-manual.html] +support-files = wpt/pointerevent_pointerleave_pen-manual.html +[test_wpt_pointerevent_pointerout_after_pointercancel_touch-manual.html] +support-files = wpt/pointerevent_pointerout_after_pointercancel_touch-manual.html +[test_wpt_pointerevent_pointerout_pen-manual.html] +support-files = wpt/pointerevent_pointerout_pen-manual.html +[test_wpt_pointerevent_releasepointercapture_events_to_original_target-manual.html] +support-files = wpt/pointerevent_releasepointercapture_events_to_original_target-manual.html +[test_wpt_pointerevent_releasepointercapture_onpointercancel_touch-manual.html] +support-files = wpt/pointerevent_releasepointercapture_onpointercancel_touch-manual.html +[test_wpt_pointerevent_sequence_at_implicit_release_on_drag-manual.html] +support-files = wpt/pointerevent_sequence_at_implicit_release_on_drag-manual.html +[test_wpt_pointerevent_drag_interaction-manual.html] +support-files = wpt/html/pointerevent_drag_interaction-manual.html +[test_wpt_touch_action.html] +skip-if = os == 'android' # Bug 1312791 +support-files = + ../../../../gfx/layers/apz/test/mochitest/apz_test_utils.js + ../../../../gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js + touch_action_helpers.js + wpt/pointerevent_touch-action-auto-css_touch-manual.html + wpt/pointerevent_touch-action-button-test_touch-manual.html + wpt/pointerevent_touch-action-inherit_child-auto-child-none_touch-manual.html + wpt/pointerevent_touch-action-inherit_child-none_touch-manual.html + wpt/pointerevent_touch-action-inherit_child-pan-x-child-pan-x_touch-manual.html + wpt/pointerevent_touch-action-inherit_child-pan-x-child-pan-y_touch-manual.html + wpt/pointerevent_touch-action-inherit_highest-parent-none_touch-manual.html + wpt/pointerevent_touch-action-inherit_parent-none_touch-manual.html + wpt/pointerevent_touch-action-none-css_touch-manual.html + wpt/pointerevent_touch-action-pan-x-css_touch-manual.html + wpt/pointerevent_touch-action-pan-x-pan-y-pan-y_touch-manual.html + wpt/pointerevent_touch-action-pan-x-pan-y_touch-manual.html + wpt/pointerevent_touch-action-pan-y-css_touch-manual.html + wpt/pointerevent_touch-action-span-test_touch-manual.html + wpt/pointerevent_touch-action-svg-test_touch-manual.html + wpt/pointerevent_touch-action-table-test_touch-manual.html + wpt/pointerevent_touch-action-pan-down-css_touch-manual.html + wpt/pointerevent_touch-action-pan-left-css_touch-manual.html + wpt/pointerevent_touch-action-pan-right-css_touch-manual.html + wpt/pointerevent_touch-action-pan-up-css_touch-manual.html +[test_wpt_pointerevent_movementxy-manual.html] +support-files = + wpt/pointerlock/pointerevent_movementxy-manual.html + wpt/pointerlock/resources/pointerevent_movementxy-iframe.html +[test_wpt_pointerevent_releasepointercapture_pointerup_touch.html] +support-files = wpt/pointerevent_releasepointercapture_pointerup_touch.html +[test_wpt_pointerevent_setpointercapture_pointerup_touch.html] +support-files = wpt/pointerevent_setpointercapture_pointerup_touch.html +[test_trigger_fullscreen_by_pointer_events.html] +support-files = + file_test_trigger_fullscreen.html +[test_remove_frame_when_got_pointer_capture.html] +[test_getCoalescedEvents.html] +skip-if = + !e10s || os == 'android' # Bug 1312791 + verify && os == 'win' # Bug 1659744 +[test_pointercapture_xorigin_iframe.html] +support-files = + file_pointercapture_xorigin_iframe.html + file_pointercapture_xorigin_iframe_pointerlock.html +[test_pointercapture_remove_iframe.html] diff --git a/dom/events/test/pointerevents/mochitest_support_external.js b/dom/events/test/pointerevents/mochitest_support_external.js new file mode 100644 index 0000000000..e1ffabcccf --- /dev/null +++ b/dom/events/test/pointerevents/mochitest_support_external.js @@ -0,0 +1,286 @@ +// This file supports translating W3C tests +// to tests on auto MochiTest system with minimum changes. +// Author: Maksim Lebedev + +// Function allows to prepare our tests after load document +addEventListener( + "load", + function(event) { + console.log("OnLoad external document"); + prepareTest(); + }, + false +); + +// Function allows to initialize prerequisites before testing +function prepareTest() { + SimpleTest.waitForExplicitFinish(); + SimpleTest.requestCompleteLog(); + turnOnPointerEvents(startTest); +} + +function setImplicitPointerCapture(capture, callback) { + console.log("SET dom.w3c_pointer_events.implicit_capture as " + capture); + SpecialPowers.pushPrefEnv( + { + set: [["dom.w3c_pointer_events.implicit_capture", capture]], + }, + callback + ); +} + +function turnOnPointerEvents(callback) { + console.log("SET dom.w3c_pointer_events.enabled as TRUE"); + console.log("SET layout.css.touch_action.enabled as TRUE"); + SpecialPowers.pushPrefEnv( + { + set: [ + ["dom.w3c_pointer_events.enabled", true], + ["layout.css.touch_action.enabled", true], + ], + }, + callback + ); +} + +var utils = SpecialPowers.Ci.nsIDOMWindowUtils; + +// Mouse Event Helper Object +var MouseEventHelper = (function() { + return { + MOUSE_ID: utils.DEFAULT_MOUSE_POINTER_ID, + PEN_ID: utils.DEFAULT_PEN_POINTER_ID, + // State + // TODO: Separate this to support mouse and pen simultaneously. + BUTTONS_STATE: utils.MOUSE_BUTTONS_NO_BUTTON, + + // Button + BUTTON_NONE: -1, // Used by test framework only. (replaced before sending) + BUTTON_LEFT: utils.MOUSE_BUTTON_LEFT_BUTTON, + BUTTON_MIDDLE: utils.MOUSE_BUTTON_MIDDLE_BUTTON, + BUTTON_RIGHT: utils.MOUSE_BUTTON_RIGHT_BUTTON, + + // Buttons + BUTTONS_NONE: utils.MOUSE_BUTTONS_NO_BUTTON, + BUTTONS_LEFT: utils.MOUSE_BUTTONS_LEFT_BUTTON, + BUTTONS_MIDDLE: utils.MOUSE_BUTTONS_MIDDLE_BUTTON, + BUTTONS_RIGHT: utils.MOUSE_BUTTONS_RIGHT_BUTTON, + BUTTONS_4TH: utils.MOUSE_BUTTONS_4TH_BUTTON, + BUTTONS_5TH: utils.MOUSE_BUTTONS_5TH_BUTTON, + + // Utils + computeButtonsMaskFromButton(aButton) { + // Since the range of button values is 0 ~ 2 (see nsIDOMWindowUtils.idl), + // we can use an array to find out the desired mask. + var mask = [ + this.BUTTONS_NONE, // -1 (MouseEventHelper.BUTTON_NONE) + this.BUTTONS_LEFT, // 0 + this.BUTTONS_MIDDLE, // 1 + this.BUTTONS_RIGHT, // 2 + ][aButton + 1]; + + ok(mask !== undefined, "Unrecognized button value caught!"); + return mask; + }, + + checkExitState() { + ok(!this.BUTTONS_STATE, "Mismatched mousedown/mouseup caught."); + }, + }; +})(); + +function createMouseEvent(aEventType, aParams) { + var eventObj = { type: aEventType }; + + // Default to mouse. + eventObj.inputSource = + aParams && "inputSource" in aParams + ? aParams.inputSource + : MouseEvent.MOZ_SOURCE_MOUSE; + // Compute pointerId + eventObj.id = + eventObj.inputSource === MouseEvent.MOZ_SOURCE_MOUSE + ? MouseEventHelper.MOUSE_ID + : MouseEventHelper.PEN_ID; + // Check or generate a |button| value. + var isButtonEvent = aEventType === "mouseup" || aEventType === "mousedown"; + + // Set |button| to the default value first. + eventObj.button = isButtonEvent + ? MouseEventHelper.BUTTON_LEFT + : MouseEventHelper.BUTTON_NONE; + + // |button| is passed, use and check it. + if (aParams && "button" in aParams) { + var hasButtonValue = aParams.button !== MouseEventHelper.BUTTON_NONE; + ok( + !isButtonEvent || hasButtonValue, + "Inappropriate |button| value caught." + ); + eventObj.button = aParams.button; + } + + // Generate a |buttons| value and update buttons state + var buttonsMask = MouseEventHelper.computeButtonsMaskFromButton( + eventObj.button + ); + switch (aEventType) { + case "mousedown": + MouseEventHelper.BUTTONS_STATE |= buttonsMask; // Set button flag. + break; + case "mouseup": + MouseEventHelper.BUTTONS_STATE &= ~buttonsMask; // Clear button flag. + break; + } + eventObj.buttons = MouseEventHelper.BUTTONS_STATE; + + // Replace the button value for mousemove events. + // Since in widget level design, even when no button is pressed at all, the + // value of WidgetMouseEvent.button is still 0, which is the same value as + // the one for mouse left button. + if (aEventType === "mousemove") { + eventObj.button = MouseEventHelper.BUTTON_LEFT; + } + return eventObj; +} + +// Helper function to send MouseEvent with different parameters +function sendMouseEvent(int_win, elemId, mouseEventType, params) { + var elem = int_win.document.getElementById(elemId); + if (elem) { + var rect = elem.getBoundingClientRect(); + var eventObj = createMouseEvent(mouseEventType, params); + + // Default to the center of the target element but we can still send to a + // position outside of the target element. + var offsetX = + params && "offsetX" in params ? params.offsetX : rect.width / 2; + var offsetY = + params && "offsetY" in params ? params.offsetY : rect.height / 2; + + console.log(elemId, eventObj); + synthesizeMouse(elem, offsetX, offsetY, eventObj, int_win); + } else { + is(!!elem, true, "Document should have element with id: " + elemId); + } +} + +// Helper function to send MouseEvent with position +function sendMouseEventAtPoint(aWindow, aLeft, aTop, aMouseEventType, aParams) { + var eventObj = createMouseEvent(aMouseEventType, aParams); + console.log(eventObj); + synthesizeMouseAtPoint(aLeft, aTop, eventObj, aWindow); +} + +// Touch Event Helper Object +var TouchEventHelper = { + // State + TOUCH_ID: utils.DEFAULT_TOUCH_POINTER_ID, + TOUCH_STATE: false, + + // Utils + checkExitState() { + ok(!this.TOUCH_STATE, "Mismatched touchstart/touchend caught."); + }, +}; + +// Helper function to send TouchEvent with different parameters +// TODO: Support multiple touch points to test more features such as +// PointerEvent.isPrimary and pinch-zoom. +function sendTouchEvent(int_win, elemId, touchEventType, params) { + var elem = int_win.document.getElementById(elemId); + if (elem) { + var rect = elem.getBoundingClientRect(); + var eventObj = { + type: touchEventType, + id: TouchEventHelper.TOUCH_ID, + }; + + // Update touch state + switch (touchEventType) { + case "touchstart": + TouchEventHelper.TOUCH_STATE = true; // Set touch flag. + break; + case "touchend": + case "touchcancel": + TouchEventHelper.TOUCH_STATE = false; // Clear touch flag. + break; + } + + // Default to the center of the target element but we can still send to a + // position outside of the target element. + var offsetX = + params && "offsetX" in params ? params.offsetX : rect.width / 2; + var offsetY = + params && "offsetY" in params ? params.offsetY : rect.height / 2; + + console.log(elemId, eventObj); + synthesizeTouch(elem, offsetX, offsetY, eventObj, int_win); + } else { + is(!!elem, true, "Document should have element with id: " + elemId); + } +} + +// Helper function to trigger drag and drop. +async function doDragAndDrop(int_win, srcElemId, destElemId, params = {}) { + params.srcElement = int_win.document.getElementById(srcElemId); + params.destElement = int_win.document.getElementById(destElemId); + params.srcWindow = int_win; + params.destWindow = int_win; + params.id = MouseEventHelper.MOUSE_ID; + // This is basically for android which has a larger drag threshold. + params.stepY = params.stepY || 25; + await synthesizePlainDragAndDrop(params); +} + +// Helper function to run Point Event test in a new tab. +function runTestInNewWindow(aFile) { + var testURL = + location.href.substring(0, location.href.lastIndexOf("/") + 1) + aFile; + var testWindow = window.open(testURL, "_blank"); + var testDone = false; + + // We start testing when receiving load event. Inject the mochitest helper js + // to the test case after DOM elements are constructed and before the load + // event is fired. + testWindow.addEventListener( + "DOMContentLoaded", + function() { + var e = testWindow.document.createElement("script"); + e.type = "text/javascript"; + e.src = + "../".repeat(aFile.split("/").length - 1) + + "mochitest_support_internal.js"; + testWindow.document.getElementsByTagName("head")[0].appendChild(e); + }, + { once: true } + ); + + window.addEventListener("message", function(aEvent) { + switch (aEvent.data.type) { + case "START": + // Update constants + MouseEventHelper.MOUSE_ID = aEvent.data.message.mouseId; + MouseEventHelper.PEN_ID = aEvent.data.message.penId; + TouchEventHelper.TOUCH_ID = aEvent.data.message.touchId; + + turnOnPointerEvents(() => { + executeTest(testWindow); + }); + return; + case "RESULT": + // Should not perform checking after SimpleTest.finish(). + if (!testDone) { + ok(aEvent.data.result, aEvent.data.message); + } + return; + case "FIN": + testDone = true; + MouseEventHelper.checkExitState(); + TouchEventHelper.checkExitState(); + testWindow.close(); + SimpleTest.finish(); + return; + } + }); +} diff --git a/dom/events/test/pointerevents/mochitest_support_internal.js b/dom/events/test/pointerevents/mochitest_support_internal.js new file mode 100644 index 0000000000..cdc10a3181 --- /dev/null +++ b/dom/events/test/pointerevents/mochitest_support_internal.js @@ -0,0 +1,125 @@ +// This file supports translating W3C tests +// to tests on auto MochiTest system with minimum changes. +// Author: Maksim Lebedev + +const PARENT_ORIGIN = "http://mochi.test:8888/"; + +// Since web platform tests don't check pointerId, we have to use some heuristic +// to test them. and thus pointerIds are send to mochitest_support_external.js +// before we start sending synthesized widget events. Here, we avoid using +// default values used in Gecko to insure everything works as expected. +const POINTER_MOUSE_ID = 7; +const POINTER_PEN_ID = 8; +const POINTER_TOUCH_ID = 9; // Extend for multiple touch points if needed. + +// Setup environment. +addListeners(document.getElementById("target0")); +addListeners(document.getElementById("target1")); + +// Setup communication between mochitest_support_external.js. +// Function allows to initialize prerequisites before testing +// and adds some callbacks to support mochitest system. +function resultCallback(aTestObj) { + var message = aTestObj.name + " ("; + message += "Get: " + JSON.stringify(aTestObj.status) + ", "; + message += "Expect: " + JSON.stringify(aTestObj.PASS) + ")"; + window.opener.postMessage( + { + type: "RESULT", + message, + result: aTestObj.status === aTestObj.PASS, + }, + PARENT_ORIGIN + ); +} + +add_result_callback(resultCallback); +add_completion_callback(() => { + window.opener.postMessage({ type: "FIN" }, PARENT_ORIGIN); +}); + +window.addEventListener("load", () => { + // Start testing. + var startMessage = { + type: "START", + message: { + mouseId: POINTER_MOUSE_ID, + penId: POINTER_PEN_ID, + touchId: POINTER_TOUCH_ID, + }, + }; + window.opener.postMessage(startMessage, PARENT_ORIGIN); +}); + +function addListeners(elem) { + if (!elem) { + return; + } + var All_Events = [ + "pointerdown", + "pointerup", + "pointercancel", + "pointermove", + "pointerover", + "pointerout", + "pointerenter", + "pointerleave", + "gotpointercapture", + "lostpointercapture", + ]; + All_Events.forEach(function(name) { + elem.addEventListener(name, function(event) { + console.log("(" + event.type + ")-(" + event.pointerType + ")"); + + // Perform checks only for trusted events. + if (!event.isTrusted) { + return; + } + + // Compute the desired event.pointerId from event.pointerType. + var pointerId = { + mouse: POINTER_MOUSE_ID, + pen: POINTER_PEN_ID, + touch: POINTER_TOUCH_ID, + }[event.pointerType]; + + // Compare the pointerId. + resultCallback({ + name: "Mismatched event.pointerId recieved.", + status: event.pointerId, + PASS: pointerId, + }); + }); + }); +} + +// mock the touchScrollInTarget to make the test work. +function touchScrollInTarget() { + return Promise.resolve(); +} + +// mock test_driver to make the test work. +function Actions() {} +Actions.prototype = { + addPointer() { + return this; + }, + pointerMove() { + return this; + }, + pointerDown() { + return this; + }, + pause() { + return this; + }, + pointerUp() { + return this; + }, + send() { + return Promise.resolve(); + }, +}; +const test_driver = { + Actions, +}; diff --git a/dom/events/test/pointerevents/pointerevent_utils.js b/dom/events/test/pointerevents/pointerevent_utils.js new file mode 100644 index 0000000000..44a945adf8 --- /dev/null +++ b/dom/events/test/pointerevents/pointerevent_utils.js @@ -0,0 +1,60 @@ +// Get test filename for page being run in popup so errors are more useful +var testName = location.pathname.split("/").pop(); + +// Wrap test functions and pass to parent window +window.ok = function(a, msg) { + opener.ok(a, testName + ": " + msg); +}; + +window.is = function(a, b, msg) { + opener.is(a, b, testName + ": " + msg); +}; + +window.isnot = function(a, b, msg) { + opener.isnot(a, b, testName + ": " + msg); +}; + +window.todo = function(a, msg) { + opener.todo(a, testName + ": " + msg); +}; + +window.todo_is = function(a, b, msg) { + opener.todo_is(a, b, testName + ": " + msg); +}; + +window.todo_isnot = function(a, b, msg) { + opener.todo_isnot(a, b, testName + ": " + msg); +}; + +window.info = function(msg) { + opener.info(testName + ": " + msg); +}; + +// Override bits of SimpleTest so test files work stand-alone +var SimpleTest = SimpleTest || {}; + +SimpleTest.waitForExplicitFinish = function() { + dump("[POINTEREVENT] Starting " + testName + "\n"); +}; + +SimpleTest.finish = function() { + dump("[POINTEREVENT] Finishing " + testName + "\n"); + opener.nextTest(); +}; + +// Utility functions +function waitForEvent(aTarget, aEvent, aCallback) { + return new Promise(aResolve => { + aTarget.addEventListener( + aEvent, + e => { + ok(true, `got ${e.type} event on ${e.target.id}`); + if (aCallback) { + aCallback(e); + } + aResolve(); + }, + { once: true } + ); + }); +} diff --git a/dom/events/test/pointerevents/readme.md b/dom/events/test/pointerevents/readme.md new file mode 100644 index 0000000000..0cc0190979 --- /dev/null +++ b/dom/events/test/pointerevents/readme.md @@ -0,0 +1,9 @@ +Directory for Pointer Events Tests + +Latest Editor's Draft: https://w3c.github.io/pointerevents/ + +Latest W3C Technical Report: http://www.w3.org/TR/pointerevents/ + +Discussion forum for tests: http://lists.w3.org/Archives/Public/public-test-infra/ + +Test Assertion table: https://www.w3.org/wiki/PointerEvents/TestAssertions diff --git a/dom/events/test/pointerevents/test_bug1285128.html b/dom/events/test/pointerevents/test_bug1285128.html new file mode 100644 index 0000000000..749891d9b2 --- /dev/null +++ b/dom/events/test/pointerevents/test_bug1285128.html @@ -0,0 +1,53 @@ + + + + + + Test for Bug 1285128 + + + + + +Mozilla Bug 1285128 +

+
+
+ + + diff --git a/dom/events/test/pointerevents/test_bug1293174_implicit_pointer_capture_for_touch_1.html b/dom/events/test/pointerevents/test_bug1293174_implicit_pointer_capture_for_touch_1.html new file mode 100644 index 0000000000..a02432f3b3 --- /dev/null +++ b/dom/events/test/pointerevents/test_bug1293174_implicit_pointer_capture_for_touch_1.html @@ -0,0 +1,30 @@ + + + + + Test for Bug 1293174 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_bug1293174_implicit_pointer_capture_for_touch_2.html b/dom/events/test/pointerevents/test_bug1293174_implicit_pointer_capture_for_touch_2.html new file mode 100644 index 0000000000..2e5aaccccc --- /dev/null +++ b/dom/events/test/pointerevents/test_bug1293174_implicit_pointer_capture_for_touch_2.html @@ -0,0 +1,30 @@ + + + + + Test for Bug 1293174 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_bug1303704.html b/dom/events/test/pointerevents/test_bug1303704.html new file mode 100644 index 0000000000..3fc1fb799a --- /dev/null +++ b/dom/events/test/pointerevents/test_bug1303704.html @@ -0,0 +1,135 @@ + + + + + + Test for Bug 1303704 + + + + + + + +Mozilla Bug 1303704 +

+Link 1 +
+
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+scroll
+
+
+ + + diff --git a/dom/events/test/pointerevents/test_bug1315862.html b/dom/events/test/pointerevents/test_bug1315862.html new file mode 100644 index 0000000000..55f5690d5b --- /dev/null +++ b/dom/events/test/pointerevents/test_bug1315862.html @@ -0,0 +1,68 @@ + + + + + + Test for Bug 1315862 + + + + + +

+ This is a test to check if pointer events are dispatched in the system group +

+ + + diff --git a/dom/events/test/pointerevents/test_bug1323158.html b/dom/events/test/pointerevents/test_bug1323158.html new file mode 100644 index 0000000000..5dbae4966d --- /dev/null +++ b/dom/events/test/pointerevents/test_bug1323158.html @@ -0,0 +1,93 @@ + + + + + + This is a test to check if target and relatedTarget of mouse events are the same as pointer events + + + + + +

+ + + diff --git a/dom/events/test/pointerevents/test_bug1403055.html b/dom/events/test/pointerevents/test_bug1403055.html new file mode 100644 index 0000000000..a236899b0c --- /dev/null +++ b/dom/events/test/pointerevents/test_bug1403055.html @@ -0,0 +1,92 @@ + + + + + + Test for Bug 1403055 + + + + + +Mozilla Bug 1403055 +

+
+
+
+ + + diff --git a/dom/events/test/pointerevents/test_bug1420589_1.html b/dom/events/test/pointerevents/test_bug1420589_1.html new file mode 100644 index 0000000000..a3808ea061 --- /dev/null +++ b/dom/events/test/pointerevents/test_bug1420589_1.html @@ -0,0 +1,103 @@ + + + + + + Test for Bug 1420589 + + + + + +Mozilla Bug 1420589 +

+ + + + + diff --git a/dom/events/test/pointerevents/test_bug1420589_2.html b/dom/events/test/pointerevents/test_bug1420589_2.html new file mode 100644 index 0000000000..9a8eff762a --- /dev/null +++ b/dom/events/test/pointerevents/test_bug1420589_2.html @@ -0,0 +1,120 @@ + + + + + + Test for Bug 1420589 + + + + + +Mozilla Bug 1420589 +

+
+ + + + diff --git a/dom/events/test/pointerevents/test_bug1420589_3.html b/dom/events/test/pointerevents/test_bug1420589_3.html new file mode 100644 index 0000000000..69a2f03bc3 --- /dev/null +++ b/dom/events/test/pointerevents/test_bug1420589_3.html @@ -0,0 +1,113 @@ + + + + + + Test for Bug 1420589 + + + + + +Mozilla Bug 1420589 +

+
+ + + + diff --git a/dom/events/test/pointerevents/test_getCoalescedEvents.html b/dom/events/test/pointerevents/test_getCoalescedEvents.html new file mode 100644 index 0000000000..7c4f9ad5be --- /dev/null +++ b/dom/events/test/pointerevents/test_getCoalescedEvents.html @@ -0,0 +1,92 @@ + + + + + + Test for Bug 1303957 + + + + + +Mozilla Bug 1303957 +

+
+ + + diff --git a/dom/events/test/pointerevents/test_multiple_touches.html b/dom/events/test/pointerevents/test_multiple_touches.html new file mode 100644 index 0000000000..89b476b26d --- /dev/null +++ b/dom/events/test/pointerevents/test_multiple_touches.html @@ -0,0 +1,189 @@ + + + + + Test for Multiple Touches + + + + + +

+
+
+ + + diff --git a/dom/events/test/pointerevents/test_pointercapture_remove_iframe.html b/dom/events/test/pointerevents/test_pointercapture_remove_iframe.html new file mode 100644 index 0000000000..3ccf3292f3 --- /dev/null +++ b/dom/events/test/pointerevents/test_pointercapture_remove_iframe.html @@ -0,0 +1,80 @@ + + + + +Bug 1686037 + + + + + + +Mozilla Bug 1686037 +
+ + +
+
+
+ + diff --git a/dom/events/test/pointerevents/test_pointercapture_xorigin_iframe.html b/dom/events/test/pointerevents/test_pointercapture_xorigin_iframe.html new file mode 100644 index 0000000000..46dcd10390 --- /dev/null +++ b/dom/events/test/pointerevents/test_pointercapture_xorigin_iframe.html @@ -0,0 +1,54 @@ + + + +Test for pointer capture + + + + + +Test for pointer capture +
+
+
+
+ + diff --git a/dom/events/test/pointerevents/test_remove_frame_when_got_pointer_capture.html b/dom/events/test/pointerevents/test_remove_frame_when_got_pointer_capture.html new file mode 100644 index 0000000000..535fcdec43 --- /dev/null +++ b/dom/events/test/pointerevents/test_remove_frame_when_got_pointer_capture.html @@ -0,0 +1,170 @@ + + + + + Test for triggering popup by pointer events + + + + + +

+

+ + + diff --git a/dom/events/test/pointerevents/test_trigger_fullscreen_by_pointer_events.html b/dom/events/test/pointerevents/test_trigger_fullscreen_by_pointer_events.html new file mode 100644 index 0000000000..3484e87f73 --- /dev/null +++ b/dom/events/test/pointerevents/test_trigger_fullscreen_by_pointer_events.html @@ -0,0 +1,55 @@ + + + + + Test for triggering Fullscreen by pointer events + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_attributes_hoverable_pointers-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_attributes_hoverable_pointers-manual.html new file mode 100644 index 0000000000..557ee80c4f --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_attributes_hoverable_pointers-manual.html @@ -0,0 +1,53 @@ + + + + + Test pointerevent attributes for hoverable pointers + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_attributes_nohover_pointers-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_attributes_nohover_pointers-manual.html new file mode 100644 index 0000000000..f9fde4f92f --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_attributes_nohover_pointers-manual.html @@ -0,0 +1,26 @@ + + + + + Test pointerevent attributes for non-hoverable pointers + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_boundary_events_in_capturing-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_boundary_events_in_capturing-manual.html new file mode 100644 index 0000000000..24aeb6d9a6 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_boundary_events_in_capturing-manual.html @@ -0,0 +1,46 @@ + + + + + W3C pointerevent_boundary_events_in_capturing-manual.html in Mochitest form + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_change-touch-action-onpointerdown_touch-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_change-touch-action-onpointerdown_touch-manual.html new file mode 100644 index 0000000000..f95b16c850 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_change-touch-action-onpointerdown_touch-manual.html @@ -0,0 +1,39 @@ + + + + + + Test for Bug 1000870 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_constructor.html b/dom/events/test/pointerevents/test_wpt_pointerevent_constructor.html new file mode 100644 index 0000000000..058e32a967 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_constructor.html @@ -0,0 +1,26 @@ + + + + + + Test for Bug 1000870 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_drag_interaction-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_drag_interaction-manual.html new file mode 100644 index 0000000000..a05ee9557a --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_drag_interaction-manual.html @@ -0,0 +1,38 @@ + + + + + + Test for Bug 1669673 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_movementxy-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_movementxy-manual.html new file mode 100644 index 0000000000..3059f868b7 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_movementxy-manual.html @@ -0,0 +1,53 @@ + + + + + + Test for Bug 1399740 + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_multiple_primary_pointers_boundary_events-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_multiple_primary_pointers_boundary_events-manual.html new file mode 100644 index 0000000000..825e23857f --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_multiple_primary_pointers_boundary_events-manual.html @@ -0,0 +1,31 @@ + + + + + + Test for Bug 1000870 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_pointerId_scope-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_pointerId_scope-manual.html new file mode 100644 index 0000000000..f52bf7fc20 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_pointerId_scope-manual.html @@ -0,0 +1,27 @@ + + + + + + Test for Bug 1000870 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_pointercancel_touch-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_pointercancel_touch-manual.html new file mode 100644 index 0000000000..0adba4f756 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_pointercancel_touch-manual.html @@ -0,0 +1,30 @@ + + + + + + Test for Bug 1000870 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_pointerleave_after_pointercancel_touch-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_pointerleave_after_pointercancel_touch-manual.html new file mode 100644 index 0000000000..53c897bcd0 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_pointerleave_after_pointercancel_touch-manual.html @@ -0,0 +1,30 @@ + + + + + + Test for Bug 1000870 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_pointerleave_pen-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_pointerleave_pen-manual.html new file mode 100644 index 0000000000..e4904780f6 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_pointerleave_pen-manual.html @@ -0,0 +1,28 @@ + + + + + + Test for Bug 1000870 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_pointerout_after_pointercancel_touch-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_pointerout_after_pointercancel_touch-manual.html new file mode 100644 index 0000000000..53cf765fb6 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_pointerout_after_pointercancel_touch-manual.html @@ -0,0 +1,30 @@ + + + + + + Test for Bug 1000870 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_pointerout_pen-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_pointerout_pen-manual.html new file mode 100644 index 0000000000..6b41f6492b --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_pointerout_pen-manual.html @@ -0,0 +1,28 @@ + + + + + + Test for Bug 1000870 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_events_to_original_target-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_events_to_original_target-manual.html new file mode 100644 index 0000000000..92d8be52f0 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_events_to_original_target-manual.html @@ -0,0 +1,49 @@ + + + + + + Test for Bug 1000870 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_onpointercancel_touch-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_onpointercancel_touch-manual.html new file mode 100644 index 0000000000..eb39b0bee3 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_onpointercancel_touch-manual.html @@ -0,0 +1,30 @@ + + + + + + Test for Bug 1000870 + + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_pointerup_touch.html b/dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_pointerup_touch.html new file mode 100644 index 0000000000..67f1ead9a4 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_releasepointercapture_pointerup_touch.html @@ -0,0 +1,29 @@ + + + + + + Test for Bug 1556703 + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_sequence_at_implicit_release_on_drag-manual.html b/dom/events/test/pointerevents/test_wpt_pointerevent_sequence_at_implicit_release_on_drag-manual.html new file mode 100644 index 0000000000..40a6be2e71 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_sequence_at_implicit_release_on_drag-manual.html @@ -0,0 +1,27 @@ + + + + + W3C pointerevent_sequence_at_implicit_release_on_drag-manual.html in Mochitest form + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_pointerevent_setpointercapture_pointerup_touch.html b/dom/events/test/pointerevents/test_wpt_pointerevent_setpointercapture_pointerup_touch.html new file mode 100644 index 0000000000..1287ae6107 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_pointerevent_setpointercapture_pointerup_touch.html @@ -0,0 +1,26 @@ + + + + + + Test for Bug 1556703 + + + + + + + + + diff --git a/dom/events/test/pointerevents/test_wpt_touch_action.html b/dom/events/test/pointerevents/test_wpt_touch_action.html new file mode 100644 index 0000000000..ee946f06b0 --- /dev/null +++ b/dom/events/test/pointerevents/test_wpt_touch_action.html @@ -0,0 +1,103 @@ + + + + + W3C pointerevents/*touch-action*.html tests in Mochitest form + + + + + + + + + diff --git a/dom/events/test/pointerevents/touch_action_helpers.js b/dom/events/test/pointerevents/touch_action_helpers.js new file mode 100644 index 0000000000..2d6098112e --- /dev/null +++ b/dom/events/test/pointerevents/touch_action_helpers.js @@ -0,0 +1,263 @@ +// Some common helpers + +function touchActionSetup(testDriver) { + add_completion_callback(subtestDone); + document.body.addEventListener("touchend", testDriver, { passive: true }); +} + +function touchActionSetupAndWaitTestDone(testDriver) { + let testDone = new Promise(resolve => { + add_completion_callback(resolve); + }); + + document.body.addEventListener("touchend", testDriver, { passive: true }); + return testDone; +} + +function touchScrollRight(aSelector = "#target0", aX = 20, aY = 20) { + var target = document.querySelector(aSelector); + return ok( + synthesizeNativeTouchDrag(target, aX + 40, aY, -40, 0), + "Synthesized horizontal drag" + ); +} + +function touchScrollDown(aSelector = "#target0", aX = 20, aY = 20) { + var target = document.querySelector(aSelector); + return ok( + synthesizeNativeTouchDrag(target, aX, aY + 40, 0, -40), + "Synthesized vertical drag" + ); +} + +function tapComplete() { + var button = document.getElementById("btnComplete"); + return button.click(); +} + +function waitForResetScrollLeft(aSelector = "#target0") { + var target = document.querySelector(aSelector); + return new Promise(resolve => { + target.addEventListener("scroll", function onScroll() { + if (target.scrollLeft == 0) { + target.removeEventListener("scroll", onScroll); + resolve(); + } + }); + }); +} + +// The main body functions to simulate the input events required for the named test + +function* pointerevent_touch_action_auto_css_touch_manual(testDriver) { + let testDone = touchActionSetupAndWaitTestDone(testDriver); + + yield touchScrollRight(); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollDown(); + yield testDone.then(testDriver); + subtestDone(); +} + +function* pointerevent_touch_action_button_test_touch_manual(testDriver) { + touchActionSetup(testDriver); + + yield touchScrollDown(); + yield waitForApzFlushedRepaints(testDriver); + yield setTimeout(testDriver, 2 * scrollReturnInterval); + yield touchScrollRight(); + let resetScrollLeft = waitForResetScrollLeft(); + yield waitForApzFlushedRepaints(testDriver); + yield setTimeout(testDriver, 2 * scrollReturnInterval); + // Wait for resetting target0's scrollLeft to avoid the reset break the + // following scroll behaviors. + yield resetScrollLeft.then(testDriver); + yield touchScrollDown("#target0 > button"); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight("#target0 > button"); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_inherit_child_auto_child_none_touch_manual( + testDriver +) { + touchActionSetup(testDriver); + + yield touchScrollDown("#target0 > div div"); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight("#target0 > div div"); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_inherit_child_none_touch_manual( + testDriver +) { + touchActionSetup(testDriver); + + yield touchScrollDown("#target0 > div"); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight("#target0 > div"); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_inherit_child_pan_x_child_pan_x_touch_manual( + testDriver +) { + touchActionSetup(testDriver); + + yield touchScrollDown("#target0 > div div"); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight("#target0 > div div"); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_inherit_child_pan_x_child_pan_y_touch_manual( + testDriver +) { + touchActionSetup(testDriver); + + yield touchScrollDown("#target0 > div div"); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight("#target0 > div div"); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_inherit_highest_parent_none_touch_manual( + testDriver +) { + let testDone = touchActionSetupAndWaitTestDone(testDriver); + + yield touchScrollDown("#target0 > div"); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight("#target0 > div"); + yield testDone.then(testDriver); + subtestDone(); +} + +function* pointerevent_touch_action_inherit_parent_none_touch_manual( + testDriver +) { + touchActionSetup(testDriver); + + yield touchScrollDown(); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight(); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_none_css_touch_manual(testDriver) { + touchActionSetup(testDriver); + + yield touchScrollDown(); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight(); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_pan_x_css_touch_manual(testDriver) { + touchActionSetup(testDriver); + + yield touchScrollDown(); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight(); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_pan_x_pan_y_pan_y_touch_manual(testDriver) { + touchActionSetup(testDriver); + + yield touchScrollDown("#target0 > div div"); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight("#target0 > div div"); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_pan_x_pan_y_touch_manual(testDriver) { + let testDone = touchActionSetupAndWaitTestDone(testDriver); + + yield touchScrollDown(); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight(); + yield testDone.then(testDriver); + subtestDone(); +} + +function* pointerevent_touch_action_pan_y_css_touch_manual(testDriver) { + touchActionSetup(testDriver); + + yield touchScrollDown(); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight(); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_span_test_touch_manual(testDriver) { + touchActionSetup(testDriver); + + yield touchScrollDown(); + yield waitForApzFlushedRepaints(testDriver); + yield setTimeout(testDriver, 2 * scrollReturnInterval); + yield touchScrollRight(); + let resetScrollLeft = waitForResetScrollLeft(); + yield waitForApzFlushedRepaints(testDriver); + yield setTimeout(testDriver, 2 * scrollReturnInterval); + // Wait for resetting target0's scrollLeft to avoid the reset break the + // following scroll behaviors. + yield resetScrollLeft.then(testDriver); + yield touchScrollDown("#testspan"); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight("#testspan"); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_svg_test_touch_manual(testDriver) { + touchActionSetup(testDriver); + + yield touchScrollDown(); + yield waitForApzFlushedRepaints(testDriver); + yield setTimeout(testDriver, 2 * scrollReturnInterval); + yield touchScrollRight(); + yield waitForApzFlushedRepaints(testDriver); + yield setTimeout(testDriver, 2 * scrollReturnInterval); + yield touchScrollDown("#target0", 250, 250); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight("#target0", 250, 250); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +function* pointerevent_touch_action_table_test_touch_manual(testDriver) { + touchActionSetup(testDriver); + + yield touchScrollDown("#row1"); + yield waitForApzFlushedRepaints(testDriver); + yield setTimeout(testDriver, 2 * scrollReturnInterval); + yield touchScrollRight("#row1"); + let resetScrollLeft = waitForResetScrollLeft(); + yield waitForApzFlushedRepaints(testDriver); + yield setTimeout(testDriver, 2 * scrollReturnInterval); + // Wait for resetting target0's scrollLeft to avoid the reset break the + // following scroll behaviors. + yield resetScrollLeft.then(testDriver); + yield touchScrollDown("#cell3"); + yield waitForApzFlushedRepaints(testDriver); + yield touchScrollRight("#cell3"); + yield waitForApzFlushedRepaints(testDriver); + yield tapComplete(); +} + +// This the stuff that runs the appropriate body function above + +var test = eval(_ACTIVE_TEST_NAME.replace(/-/g, "_")); +waitUntilApzStable().then(runContinuation(test)); diff --git a/dom/events/test/pointerevents/wpt/compat/pointerevent_touch-action_two-finger_interaction-manual.html b/dom/events/test/pointerevents/wpt/compat/pointerevent_touch-action_two-finger_interaction-manual.html new file mode 100644 index 0000000000..3537e0e1e9 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/compat/pointerevent_touch-action_two-finger_interaction-manual.html @@ -0,0 +1,102 @@ + + + + Pointer Event: touch-action test for two-finger interaction + + + + + + + + + + + + +

Pointer Event: touch-action test for two-finger interaction

+

+

+ Tests that a two-finger pan gesture is cancelled in 'touch-action: pan-x pan-y' but is allowed in 'touch-action: pinch-zoom' +

+
    +
  1. Touch on Black with two fingers and drag both fingers down at same speed.
  2. +
  3. Tap on Done.
  4. +
  5. Touch on Grey with two fingers and drag both fingers down at same speed.
  6. +
  7. Tap on Done.
  8. +
+
+ +
+
+ + diff --git a/dom/events/test/pointerevents/wpt/html/pointerevent_drag_interaction-manual.html b/dom/events/test/pointerevents/wpt/html/pointerevent_drag_interaction-manual.html new file mode 100644 index 0000000000..1a80d239b8 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/html/pointerevent_drag_interaction-manual.html @@ -0,0 +1,103 @@ + + + Pointer Events interaction with drag and drop + + + + + + + + + +

Pointer Events interaction with drag and drop

+

+

+ Test Description: This test checks that the pointercancel (and if needed lostpointercapture) is dispatched when drag starts. +
    +
  1. Press down on the black square.
  2. +
  3. Move your pointer to purple square and release.
  4. +
  5. Repeat the first two steps.
  6. +
  7. Repeat the first two steps once again.
  8. +
  9. Repeat the first two steps once again.
  10. +
+ Test passes if the proper behavior of the events is observed. +

+
+
+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/idlharness.html b/dom/events/test/pointerevents/wpt/idlharness.html new file mode 100644 index 0000000000..a4ba4c35f5 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/idlharness.html @@ -0,0 +1,104 @@ + + +idlharness test + + + + + + + +
+dictionary PointerEventInit : MouseEventInit {
+    long      pointerId = 0;
+    double    width = 1;
+    double    height = 1;
+    float     pressure = 0;
+    float     tangentialPressure = 0;
+    long      tiltX = 0;
+    long      tiltY = 0;
+    long      twist = 0;
+    DOMString pointerType = "";
+    boolean   isPrimary = false;
+};
+
+[Constructor(DOMString type, optional PointerEventInit eventInitDict)]
+interface PointerEvent : MouseEvent {
+    readonly attribute long      pointerId;
+    readonly attribute double    width;
+    readonly attribute double    height;
+    readonly attribute float     pressure;
+    readonly attribute float     tangentialPressure;
+    readonly attribute long      tiltX;
+    readonly attribute long      tiltY;
+    readonly attribute long      twist;
+    readonly attribute DOMString pointerType;
+    readonly attribute boolean   isPrimary;
+};
+
+partial interface Element {
+    void    setPointerCapture(long pointerId);
+    void    releasePointerCapture(long pointerId);
+    boolean hasPointerCapture(long pointerId);
+};
+
+partial interface GlobalEventHandlers {
+    attribute EventHandler ongotpointercapture;
+    attribute EventHandler onlostpointercapture;
+    attribute EventHandler onpointerdown;
+    attribute EventHandler onpointermove;
+    attribute EventHandler onpointerup;
+    attribute EventHandler onpointercancel;
+    attribute EventHandler onpointerover;
+    attribute EventHandler onpointerout;
+    attribute EventHandler onpointerenter;
+    attribute EventHandler onpointerleave;
+};
+
+partial interface Navigator {
+    readonly attribute long maxTouchPoints;
+};
+
+ diff --git a/dom/events/test/pointerevents/wpt/pointerevent_attributes_hoverable_pointers-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_attributes_hoverable_pointers-manual.html new file mode 100644 index 0000000000..0922ae7448 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_attributes_hoverable_pointers-manual.html @@ -0,0 +1,143 @@ + + + + Pointer Events properties tests + + + + + + + + + +

Pointer Events hoverable pointer attributes test

+

+

+ Test Description: This test checks the properties of hoverable pointer events. If you are using hoverable pen don't leave the range of digitizer while doing the instructions. +
    +
  1. Move your pointer over the black square and click on it.
  2. +
  3. Then move it off the black square so that it disappears.
  4. +
  5. When red square appears move your pointer over the red square and click on it.
  6. +
  7. Then move it off the red square.
  8. +
+ + Test passes if the proper behavior of the events is observed. +

+
+ +
+
+

The following pointer types were detected: .

+

Refresh the page to run the tests again with a different pointer type.

+
+
+ + + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_attributes_nohover_pointers-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_attributes_nohover_pointers-manual.html new file mode 100644 index 0000000000..0fd7904ef0 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_attributes_nohover_pointers-manual.html @@ -0,0 +1,126 @@ + + + + Pointer Events properties tests + + + + + + + + + +

Pointer Events no-hover pointer attributes test

+

+

+ Test Description: This test checks the properties of pointer events that do not support hover. +
    +
  1. Tap the black square.
  2. +
  3. Then move it off the black square so that it disappears.
  4. +
  5. When the red square appears tap on that as well.
  6. +
+ + Test passes if the proper behavior of the events is observed. +

+
+ +
+
+

The following pointer types were detected: .

+

Refresh the page to run the tests again with a different pointer type.

+
+
+ + + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_boundary_events_in_capturing-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_boundary_events_in_capturing-manual.html new file mode 100644 index 0000000000..0de4d55ed1 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_boundary_events_in_capturing-manual.html @@ -0,0 +1,97 @@ + + + + Pointer Events boundary events in capturing tests + + + + + + + + + +

Pointer Events boundary events in capturing

+

+

+ Test Description: This test checks the boundary events of pointer events while the capturing changes. If you are using hoverable pen don't leave the range of digitizer while doing the instructions. +
    +
  1. Move your pointer over the black square
  2. +
  3. Press down the pointer (i.e. press left button with mouse or touch the screen with finger or pen).
  4. +
  5. Drag the pointer within the black square.
  6. +
  7. Release the pointer.
  8. +
+ + Test passes if the proper behavior of the events is observed. +

+
+
+
Do not hover over or touch this element.
+
+

The following pointer types were detected: .

+

Refresh the page to run the tests again with a different pointer type.

+
+
+ + + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_change-touch-action-onpointerdown_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_change-touch-action-onpointerdown_touch-manual.html new file mode 100644 index 0000000000..04d56cb7a5 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_change-touch-action-onpointerdown_touch-manual.html @@ -0,0 +1,135 @@ + + + + Change touch-action on pointerdown + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Press and hold your touch. Try to scroll text in any direction. + Then release your touch and try to scroll again. Expected: no panning. +

+

Note: this test is for touch-devices only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ +

touch-action: auto to none

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_constructor.html b/dom/events/test/pointerevents/wpt/pointerevent_constructor.html new file mode 100644 index 0000000000..b2a779d1f7 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_constructor.html @@ -0,0 +1,106 @@ + + + + PointerEvent: Constructor test + + + + + + + + +

PointerEvent: Dispatch custom event

+

Test Description: This test checks if PointerEvent constructor works properly using synthetic pointerover and pointerout events. For valid results, this test must be run without generating real (trusted) pointerover or pointerout events on the black rectangle below.

+
+ +
+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_multiple_primary_pointers_boundary_events-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_multiple_primary_pointers_boundary_events-manual.html new file mode 100644 index 0000000000..eb758c7073 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_multiple_primary_pointers_boundary_events-manual.html @@ -0,0 +1,145 @@ + + + + Pointer Event: Boundary compatibility events for multiple primary pointers + + + + + + + + + + + +

Pointer Event: Boundary compatibility events for multiple primary pointers

+

+ When more than one primary pointers are active, each will have an independent sequence of pointer boundary events but the compatibilty mouse boundary events have their own sequence. +

+ Instruction: +
    +
  1. Move the mouse directly into Target0 (without going through Target1), and then leave the mouse there unmoved.
  2. +
  3. Tap directly on Target1 with a finger or a stylus, and then lift the finger/stylus off the screen/digitizer without crossing Target1 boundary.
  4. +
  5. Move the mouse into Target0 (if not there already) and move inside it.
  6. +
  7. Click Done (without passing over Target1).
  8. +
+
+ Done +
+
+ Target0 +
+
+ Target1 +
+
+

The following pointer types were detected: .

+

The following events were logged: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_pointerId_scope-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_pointerId_scope-manual.html new file mode 100644 index 0000000000..3640cb6f6b --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_pointerId_scope-manual.html @@ -0,0 +1,82 @@ + + + + + Pointer Events pointerdown tests + + + + + + + + + +

Pointer Events pointerdown tests

+ Complete the following actions: +
    +
  1. Start with your pointing device outside of black box, then move it into black box. If using touch just press in black box and don't release. +
  2. Move your pointing device into purple box (without leaving the digitizer range if you are using hover supported pen or without releasing touch if using touch). Then move it out of the purple box. +
+
+
+ +
+

The following pointer types were detected: .

+

Refresh the page to run the tests again with a different pointer type.

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_pointercancel_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_pointercancel_touch-manual.html new file mode 100644 index 0000000000..70a65eeb5c --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_pointercancel_touch-manual.html @@ -0,0 +1,77 @@ + + + + PointerCancel - touch + + + + + + + + +

pointercancel test

+

Warning: this test works properly only for devices that have touchscreen

+

+ Test Description: This test checks if pointercancel event triggers. +

Start touch over the black rectangle and then move your finger to scroll the page.

+

+

+

+ +

Pointer Events pointercancel Tests

+
+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_pointerleave_after_pointercancel_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_pointerleave_after_pointercancel_touch-manual.html new file mode 100644 index 0000000000..56be26549f --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_pointerleave_after_pointercancel_touch-manual.html @@ -0,0 +1,66 @@ + + + + pointerleave after pointercancel + + + + + + + + +

pointerleave after pointercancel

+

Test Description: This test checks if pointerleave event triggers after pointercancel. Start touch on the black rectangle and move your touch to scroll in any direction.

+

Note: this test is for touch devices only

+
+ +

Pointer Events pointerleave tests

+
+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_pointerleave_pen-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_pointerleave_pen-manual.html new file mode 100644 index 0000000000..38a2f69792 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_pointerleave_pen-manual.html @@ -0,0 +1,58 @@ + + + + Pointer Event: Dispatch pointerleave (pen). + + + + + + + + + + + + +

Pointer Event: Dispatch pointerleave (pen)

+

+ Test Description: + When a pointing device that supports hover (pen stylus) leaves the range of the digitizer while over an element, the pointerleave event must be dispatched. +

+
+
+ Use a pen to hover over then lift up away from this element. +
+
+

Test complete: Scroll to Summary to view Pass/Fail Results.

+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_pointerout_after_pointercancel_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_pointerout_after_pointercancel_touch-manual.html new file mode 100644 index 0000000000..1888591a7c --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_pointerout_after_pointercancel_touch-manual.html @@ -0,0 +1,67 @@ + + + + pointerout + + + + + + + + +

pointerout

+

Test Description: This test checks if pointerout event triggers after pointercancel. Start touch on the black rectangle and move your touch to scroll in any direction.

+

Note: this test is for touch devices only

+
+ +

Pointer Events pointerout tests

+
+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_pointerout_pen-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_pointerout_pen-manual.html new file mode 100644 index 0000000000..3973948c16 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_pointerout_pen-manual.html @@ -0,0 +1,57 @@ + + + + pointerout + + + + + + + + +

pointerout

+

Test Description: This test checks if pointerout event triggers for pen. Place your pen over the black rectangle and then pull the pen out of the digitizer's detectable range.

+

Note: this test is for devices that support hover - for pen only

+
+ +

Pointer Events pointerout tests

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_events_to_original_target-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_events_to_original_target-manual.html new file mode 100644 index 0000000000..3386fafb5a --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_events_to_original_target-manual.html @@ -0,0 +1,137 @@ + + + + Pointer Event: releasePointerCapture() - subsequent events follow normal hitting testing mechanisms + + + + + + + + + + + +

+
+

Pointer Event: releasePointerCapture() - subsequent events follow normal hitting testing mechanisms

+

+ Test Description: + Use your pointer and press down in the black box. Then move around in the box and release your pointer. + After invoking the releasePointerCapture method on an element, subsequent events for the specified + pointer must follow normal hit testing mechanisms for determining the event target. +

+
+
+
+
+

Test complete: Scroll to Summary to view Pass/Fail Results.

+

The following pointer types were detected: .

+

Refresh the page to run the tests again with a different pointer type.

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_onpointercancel_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_onpointercancel_touch-manual.html new file mode 100644 index 0000000000..105e3b5a97 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_onpointercancel_touch-manual.html @@ -0,0 +1,71 @@ + + + + Release capture on pointercancel + + + + + + + +

Pointer Events Capture Test - release capture on pointercancel

+

+ Test Description: This test checks if setCapture/releaseCapture functions works properly. Complete the following actions: +
    +
  1. Touch black rectangle and do not release your touch +
  2. Move your touch to scroll the page. "lostpointercapture" should be logged inside of the black rectangle immediately after "pointercancel" +
+

+ Test passes if the proper behavior of the events is observed. +
+ + +

Pointer Events Capture Test

+
+

Test complete: Scroll to Summary to view Pass/Fail Results.

+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_pointerup_touch.html b/dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_pointerup_touch.html new file mode 100644 index 0000000000..ce730492b4 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_releasepointercapture_pointerup_touch.html @@ -0,0 +1,102 @@ + + + + releasePointerCapture on pointerup + + + + + + + + + + +

Pointer Events Capture Test - releasePointerCapture on pointerup

+

+ Test Description: This test checks if releaseCapture works properly on pointer up. Complete the following actions: +
    +
  1. Touch black rectangle and do not release your touch +
  2. Move and release your touch anywhere over the document +
+

+ Test passes if the proper behavior of the events is observed. +
+ + +

Pointer Events Capture Test

+
+

Test complete: Scroll to Summary to view Pass/Fail Results.

+

The following pointer types were detected: .

+

The following events were logged: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_sequence_at_implicit_release_on_click-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_sequence_at_implicit_release_on_click-manual.html new file mode 100644 index 0000000000..274f9a435b --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_sequence_at_implicit_release_on_click-manual.html @@ -0,0 +1,83 @@ + + + + Pointer Event: Event sequence at implicit release on click + + + + + + + + + + + +

Pointer Event: Event sequence at implicit release on click

+

+

+ When a captured pointer is implicitly released after a click, the boundary events should follow the lostpointercapture event. +

+
    +
  1. Click or tap on Black.
  2. +
  3. Click or tap on Green.
  4. +
+
+
+
+

The following pointer types were detected: .

+

The following events were logged: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_sequence_at_implicit_release_on_drag-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_sequence_at_implicit_release_on_drag-manual.html new file mode 100644 index 0000000000..7b8e39b94d --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_sequence_at_implicit_release_on_drag-manual.html @@ -0,0 +1,84 @@ + + + + Pointer Event: Event sequence at implicit release on drag + + + + + + + + + + + +

Pointer Event: Event sequence at implicit release on drag

+

+

+ When a captured pointer is implicitly released after a drag, the boundary events should follow the lostpointercapture event. +

+
    +
  1. Drag quickly down starting on Black.
  2. +
  3. Click or tap on Green.
  4. +
+
+
+
+

The following pointer types were detected: .

+

The following events were logged: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_setpointercapture_pointerup_touch.html b/dom/events/test/pointerevents/wpt/pointerevent_setpointercapture_pointerup_touch.html new file mode 100644 index 0000000000..8122251a71 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_setpointercapture_pointerup_touch.html @@ -0,0 +1,102 @@ + + + + setPointerCapture on pointerup + + + + + + + + + + +

Pointer Events Capture Test - setPointerCapture on pointerup

+

+ Test Description: This test checks if releaseCapture works properly on pointer up. Complete the following actions: +
    +
  1. Touch black rectangle +
  2. Release your touch +
+

+ Test passes if the proper behavior of the events is observed. +
+ + +

Pointer Events Capture Test

+
+

Test complete: Scroll to Summary to view Pass/Fail Results.

+

The following pointer types were detected: .

+

The following events were logged: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_styles.css b/dom/events/test/pointerevents/wpt/pointerevent_styles.css new file mode 100644 index 0000000000..1ee3b0b396 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_styles.css @@ -0,0 +1,112 @@ +#innerFrame { +position: absolute; +top: 300px; +left: 200px; +height: 100px; +width: 100px; +} + +.spacer { +height: 100px; +} + +#square1 { +top: 330px; +left: 150px; +background: black; +} + +#square2 { +top: 50px; +left: 30px; +visibility: hidden; +background: red; +} + +.square { +height: 20px; +width: 20px; +position: absolute; +padding: 0px; +} + +#target0 { +background: black; +color: white; +white-space: nowrap; +overflow-y: auto; +overflow-x: auto; +} + +#target1 { +background: purple; +color: white; +white-space: nowrap; +overflow-y: auto; +overflow-x: auto; +} + +#scrollTarget { + background: darkblue; +} + +.touchActionNone { +touch-action: none; +} + +#innerframe { +width: 90%; +margin: 10px; +margin-left: 10%; +height: 200px; +} + +.scroller { +width: 700px; +height: 430px; +margin: 20px; +overflow: auto; +background: black; +} + +.scroller > div { +height: 1000px; +width: 1000px; +color: white; +} + +.scroller > div div { +height: 100%; +width: 100%; +color: white; +} + +div { +margin: 0em; +padding: 2em; +} + +#complete-notice { +background: #afa; +border: 1px solid #0a0; +display: none; +} + +#pointertype-log { +font-weight: bold; +} + +#event-log { +font-weight: bold; +} + +#listener { +background: orange; +border: 1px solid orange; +position: absolute; +top: -100px; +} + +body.scrollable { +min-height: 5000px; +} diff --git a/dom/events/test/pointerevents/wpt/pointerevent_support.js b/dom/events/test/pointerevents/wpt/pointerevent_support.js new file mode 100644 index 0000000000..4b8c83cbe0 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_support.js @@ -0,0 +1,333 @@ +var All_Pointer_Events = [ + "pointerdown", + "pointerup", + "pointercancel", + "pointermove", + "pointerover", + "pointerout", + "pointerenter", + "pointerleave", + "gotpointercapture", + "lostpointercapture", +]; + +// Check for conformance to PointerEvent interface +// TA: 1.1, 1.2, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13 +function check_PointerEvent(event, testNamePrefix) { + if (testNamePrefix === undefined) { + testNamePrefix = ""; + } + + // Use expectedPointerType if set otherwise just use the incoming event pointerType in the test name. + var pointerTestName = + testNamePrefix + + " " + + (expectedPointerType == null ? event.pointerType : expectedPointerType) + + " " + + event.type; + + if (expectedPointerType != null) { + test(function() { + assert_equals( + event.pointerType, + expectedPointerType, + "pointerType should be the one specified in the test page." + ); + }, pointerTestName + " event pointerType is correct."); + } + + test(function() { + assert_true( + event instanceof event.target.ownerDocument.defaultView.PointerEvent, + "event is a PointerEvent event" + ); + }, pointerTestName + " event is a PointerEvent event"); + + // Check attributes for conformance to WebIDL: + // * attribute exists + // * has proper type + // * if the attribute is "readonly", it cannot be changed + // TA: 1.1, 1.2 + var idl_type_check = { + long(v) { + return typeof v === "number" && Math.round(v) === v; + }, + float(v) { + return typeof v === "number"; + }, + string(v) { + return typeof v === "string"; + }, + boolean(v) { + return typeof v === "boolean"; + }, + }; + [ + ["readonly", "long", "pointerId"], + ["readonly", "float", "width"], + ["readonly", "float", "height"], + ["readonly", "float", "pressure"], + ["readonly", "long", "tiltX"], + ["readonly", "long", "tiltY"], + ["readonly", "string", "pointerType"], + ["readonly", "boolean", "isPrimary"], + ["readonly", "long", "detail", 0], + ].forEach(function(attr) { + var readonly = attr[0]; + var type = attr[1]; + var name = attr[2]; + var value = attr[3]; + + // existence check + test(function() { + assert_true( + name in event, + name + " attribute in " + event.type + " event" + ); + }, pointerTestName + "." + name + " attribute exists"); + + // readonly check + if (readonly === "readonly") { + test(function() { + assert_readonly( + event.type, + name, + event.type + "." + name + " cannot be changed" + ); + }, pointerTestName + "." + name + " is readonly"); + } + + // type check + test(function() { + assert_true( + idl_type_check[type](event[name]), + name + " attribute of type " + type + ); + }, pointerTestName + + "." + + name + + " IDL type " + + type + + " (JS type was " + + typeof event[name] + + ")"); + + // value check if defined + if (value != undefined) { + test(function() { + assert_equals(event[name], value, name + " attribute value"); + }, pointerTestName + "." + name + " value is " + value + "."); + } + }); + + // Check the pressure value + // TA: 1.6, 1.7, 1.8 + test(function() { + // TA: 1.6 + assert_greater_than_equal( + event.pressure, + 0, + "pressure is greater than or equal to 0" + ); + assert_less_than_equal( + event.pressure, + 1, + "pressure is less than or equal to 1" + ); + + if (event.type === "pointerup") { + assert_equals(event.pressure, 0, "pressure is 0 during pointerup"); + } + + // TA: 1.7, 1.8 + if (event.pointerType === "mouse") { + if (event.buttons === 0) { + assert_equals( + event.pressure, + 0, + "pressure is 0 for mouse with no buttons pressed" + ); + } else { + assert_equals( + event.pressure, + 0.5, + "pressure is 0.5 for mouse with a button pressed" + ); + } + } + }, pointerTestName + ".pressure value is valid"); + + // Check mouse-specific properties + if (event.pointerType === "mouse") { + // TA: 1.9, 1.10, 1.13 + test(function() { + assert_equals(event.width, 1, "width of mouse should be 1"); + assert_equals(event.height, 1, "height of mouse should be 1"); + assert_equals(event.tiltX, 0, event.type + ".tiltX is 0 for mouse"); + assert_equals(event.tiltY, 0, event.type + ".tiltY is 0 for mouse"); + assert_true(event.isPrimary, event.type + ".isPrimary is true for mouse"); + }, pointerTestName + " properties for pointerType = mouse"); + // Check properties for pointers other than mouse + } +} + +function showPointerTypes() { + var complete_notice = document.getElementById("complete-notice"); + var pointertype_log = document.getElementById("pointertype-log"); + var pointertypes = Object.keys(detected_pointertypes); + pointertype_log.innerHTML = pointertypes.length + ? pointertypes.join(",") + : "(none)"; + complete_notice.style.display = "block"; +} + +function showLoggedEvents() { + var event_log_elem = document.getElementById("event-log"); + event_log_elem.innerHTML = event_log.length ? event_log.join(", ") : "(none)"; + + var complete_notice = document.getElementById("complete-notice"); + complete_notice.style.display = "block"; +} + +function log(msg, el) { + if (++count > 10) { + count = 0; + el.innerHTML = " "; + } + el.innerHTML = msg + "; " + el.innerHTML; +} + +function failOnScroll() { + assert_true(false, "scroll received while shouldn't"); +} + +function updateDescriptionNextStep() { + document.getElementById("desc").innerHTML = + "Test Description: Try to scroll text RIGHT."; +} + +function updateDescriptionComplete() { + document.getElementById("desc").innerHTML = "Test Description: Test complete"; +} + +function updateDescriptionSecondStepTouchActionElement( + target, + scrollReturnInterval +) { + window.setTimeout(function() { + objectScroller(target, "up", 0); + }, scrollReturnInterval); + document.getElementById("desc").innerHTML = + "Test Description: Try to scroll element RIGHT moving your outside of the red border"; +} + +function updateDescriptionThirdStepTouchActionElement( + target, + scrollReturnInterval, + callback = null +) { + window.setTimeout(function() { + objectScroller(target, "left", 0); + if (callback) { + callback(); + } + }, scrollReturnInterval); + document.getElementById("desc").innerHTML = + "Test Description: Try to scroll element DOWN then RIGHT starting your touch inside of the element. Then tap complete button"; +} + +function updateDescriptionFourthStepTouchActionElement( + target, + scrollReturnInterval +) { + document.getElementById("desc").innerHTML = + "Test Description: Try to scroll element RIGHT starting your touch inside of the element"; +} + +function objectScroller(target, direction, value) { + if (direction == "up") { + target.scrollTop = 0; + } else if (direction == "left") { + target.scrollLeft = 0; + } +} + +function sPointerCapture(e) { + try { + target0.setPointerCapture(e.pointerId); + } catch (ex) {} +} + +function rPointerCapture(e) { + try { + captureButton.value = "Set Capture"; + target0.releasePointerCapture(e.pointerId); + } catch (ex) {} +} + +var globalPointerEventTest = null; +var expectedPointerType = null; +const ALL_POINTERS = ["mouse", "touch", "pen"]; +const HOVERABLE_POINTERS = ["mouse", "pen"]; +const NOHOVER_POINTERS = ["touch"]; + +function MultiPointerTypeTest(testName, types) { + this.testName = testName; + this.types = types; + this.currentTypeIndex = 0; + this.currentTest = null; + this.createNextTest(); +} + +MultiPointerTypeTest.prototype.skip = function() { + var prevTest = this.currentTest; + this.createNextTest(); + prevTest.timeout(); +}; + +MultiPointerTypeTest.prototype.done = function() { + var prevTest = this.currentTest; + this.createNextTest(); + if (prevTest != null) { + prevTest.done(); + } +}; + +MultiPointerTypeTest.prototype.step = function(stepFunction) { + this.currentTest.step(stepFunction); +}; + +MultiPointerTypeTest.prototype.createNextTest = function() { + if (this.currentTypeIndex < this.types.length) { + var pointerTypeDescription = document.getElementById( + "pointerTypeDescription" + ); + document.getElementById("pointerTypeDescription").innerHTML = + "Follow the test instructions with " + + this.types[this.currentTypeIndex] + + ". If you don't have the device skip it."; + this.currentTest = async_test( + this.types[this.currentTypeIndex] + " " + this.testName + ); + expectedPointerType = this.types[this.currentTypeIndex]; + this.currentTypeIndex++; + } else { + document.getElementById("pointerTypeDescription").innerHTML = ""; + } + resetTestState(); +}; + +function setup_pointerevent_test(testName, supportedPointerTypes) { + return (globalPointerEventTest = new MultiPointerTypeTest( + testName, + supportedPointerTypes + )); +} + +function checkPointerEventType(event) { + assert_equals( + event.pointerType, + expectedPointerType, + "pointerType should be the same as the requested device." + ); +} diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-auto-css_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-auto-css_touch-manual.html new file mode 100644 index 0000000000..f5e9d12c35 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-auto-css_touch-manual.html @@ -0,0 +1,129 @@ + + + + touch-action: auto + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll text DOWN. Wait for description update. Expected: pan enabled

+

Note: this test is for touch-devices only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ +

touch-action: auto

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-button-test_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-button-test_touch-manual.html new file mode 100644 index 0000000000..c7c5d9a440 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-button-test_touch-manual.html @@ -0,0 +1,110 @@ + + + + Button touch-action test + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll black element DOWN moving your touch outside of the red border. Wait for description update.

+

Note: this test is for touch only

+
+ +
+
+ + + +

touch-action: none

+
+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-illegal.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-illegal.html new file mode 100644 index 0000000000..5fe6179840 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-illegal.html @@ -0,0 +1,67 @@ + + + + touch-action: illegal + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Test will automatically check behaviour of following combinations: 'pan-x none', 'pan-y none', 'auto none'

+
+
+
+ +

touch-action: none

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-auto-child-none_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-auto-child-none_touch-manual.html new file mode 100644 index 0000000000..dcea283750 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-auto-child-none_touch-manual.html @@ -0,0 +1,117 @@ + + + + touch-action: parent > child: auto > child: none + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN then RIGHT inside blue rectangle. Tap Complete button under the rectangle when done. Expected: no panning.

+

Note: this test is for touch-devices only

+
+
+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+
+
+ + +

behaviour: none

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-none_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-none_touch-manual.html new file mode 100644 index 0000000000..16e42954e5 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-none_touch-manual.html @@ -0,0 +1,112 @@ + + + + touch-action: child: none + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN then RIGHT inside blue rectangle. Tap Complete button under the rectangle when done. Expected: no panning

+

Note: this test is for touch-devices only

+
+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+
+ + +

behaviour: none

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-pan-x-child-pan-x_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-pan-x-child-pan-x_touch-manual.html new file mode 100644 index 0000000000..c75d067e44 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-pan-x-child-pan-x_touch-manual.html @@ -0,0 +1,112 @@ + + + + touch-action: parent > child: pan-x > child: pan-x + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN then RIGHT inside blue rectangle. Tap Complete button under the rectangle when done. Expected: only pans in x direction.

+

Note: this test is for touch-devices only

+
+
+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+
+
+ + +

behaviour: pan-x

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-pan-x-child-pan-y_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-pan-x-child-pan-y_touch-manual.html new file mode 100644 index 0000000000..d420cc56c7 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_child-pan-x-child-pan-y_touch-manual.html @@ -0,0 +1,117 @@ + + + + touch-action: parent > child: pan-x > child: pan-y + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN then RIGHT inside blue rectangle. Tap Complete button under the rectangle when done. Expected: no panning/zooming/etc.

+

Note: this test is for touch-devices only

+
+
+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+
+
+ + +

behaviour: none

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_highest-parent-none_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_highest-parent-none_touch-manual.html new file mode 100644 index 0000000000..d87d2b3a34 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_highest-parent-none_touch-manual.html @@ -0,0 +1,133 @@ + + + + touch-action: parent: none + two embedded children + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll text DOWN inside blue rectangle. Wait for description update. Expected: pan enabled

+

Note: this test is for touch-devices only

+
+
+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+
+
+ +

behaviour: auto

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_parent-none_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_parent-none_touch-manual.html new file mode 100644 index 0000000000..5e674a14da --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-inherit_parent-none_touch-manual.html @@ -0,0 +1,112 @@ + + + + touch-action: inherit from parent: none + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN then RIGHT inside blue rectangle. Tap Complete button under the rectangle when done. Expected: no panning

+

Note: this test is for touch-devices only

+
+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+
+ + +

behaviour: none

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-keyboard-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-keyboard-manual.html new file mode 100644 index 0000000000..3fef3f646f --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-keyboard-manual.html @@ -0,0 +1,124 @@ + + + + touch-action: keyboard + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Press DOWN ARROW key. Wait for description update. Expected: pan enabled

+

Note: this test is for keyboard only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ +

touch-action: none

+
+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-mouse-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-mouse-manual.html new file mode 100644 index 0000000000..fcc8584515 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-mouse-manual.html @@ -0,0 +1,130 @@ + + + + touch-action: mouse + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll text down using mouse (use mouse wheel or click on the scrollbar). Wait for description update.

+

Note: this test is for mouse only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ +

touch-action: none

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-none-css_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-none-css_touch-manual.html new file mode 100644 index 0000000000..dec694f3ec --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-none-css_touch-manual.html @@ -0,0 +1,111 @@ + + + + touch-action: none + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN then RIGHT. Tap Complete button under the rectangle when done. Expected: no panning/zooming/etc.

+

Note: this test is for touch-devices only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ + +

touch-action: none

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-down-css_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-down-css_touch-manual.html new file mode 100644 index 0000000000..16e1cb2fab --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-down-css_touch-manual.html @@ -0,0 +1,114 @@ + + + + touch-action: pan-down + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element UP (drag down), then RIGHT (drag left), then DOWN (drag up). Tap Complete button under the rectangle when done. Expected: only pans in down direction.

+

Note: this test is for touch-devices only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ + +

touch-action: pan-down

+
+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-left-css_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-left-css_touch-manual.html new file mode 100644 index 0000000000..53fd2de138 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-left-css_touch-manual.html @@ -0,0 +1,114 @@ + + + + touch-action: pan-left + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN (drag up), then RIGHT (drag left), then LEFT (drag right). Tap Complete button under the rectangle when done. Expected: only pans in left direction.

+

Note: this test is for touch-devices only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ + +

touch-action: pan-left

+
+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-right-css_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-right-css_touch-manual.html new file mode 100644 index 0000000000..53bbac65ec --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-right-css_touch-manual.html @@ -0,0 +1,114 @@ + + + + touch-action: pan-right + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN (drag up), then LEFT (drag right), then RIGHT (drag left). Tap Complete button under the rectangle when done. Expected: only pans in right direction.

+

Note: this test is for touch-devices only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ + +

touch-action: pan-right

+
+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-up-css_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-up-css_touch-manual.html new file mode 100644 index 0000000000..0902700d2d --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-up-css_touch-manual.html @@ -0,0 +1,114 @@ + + + + touch-action: pan-up + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN (drag up), then RIGHT (drag left), then UP (drag down). Tap Complete button under the rectangle when done. Expected: only pans in up direction.

+

Note: this test is for touch-devices only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ + +

touch-action: pan-up

+
+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-css_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-css_touch-manual.html new file mode 100644 index 0000000000..e757baec6b --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-css_touch-manual.html @@ -0,0 +1,106 @@ + + + + touch-action: pan-x + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN then RIGHT. Tap Complete button under the rectangle when done. Expected: only pans in x direction.

+

Note: this test is for touch-devices only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ + +

touch-action: pan-x

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-pan-y-pan-y_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-pan-y-pan-y_touch-manual.html new file mode 100644 index 0000000000..e2a4386b27 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-pan-y-pan-y_touch-manual.html @@ -0,0 +1,111 @@ + + + + touch-action: parent > child: pan-x pan-y > child: pan-y + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN then RIGHT inside blue rectangle. Tap Complete button under the rectangle when done. Expected: only pans in y direction.

+

Note: this test is for touch-devices only

+
+
+
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+
+
+ + +

behaviour: pan-y

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-pan-y_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-pan-y_touch-manual.html new file mode 100644 index 0000000000..0c900ff740 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-x-pan-y_touch-manual.html @@ -0,0 +1,126 @@ + + + + touch-action: pan-x pan-y + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll text DOWN. Wait for description update. Expected: pan enabled

+

Note: this test is for touch-devices only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ +

touch-action: pan-x pan-y

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-y-css_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-y-css_touch-manual.html new file mode 100644 index 0000000000..4ad39ecc83 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-pan-y-css_touch-manual.html @@ -0,0 +1,106 @@ + + + + touch-action: pan-y + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN then RIGHT. Tap Complete button under the rectangle when done. Expected: only pans in y direction.

+

Note: this test is for touch-devices only

+
+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem + nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. + Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit + lobortis nisl ut aliquip ex ea commodo consequat. +

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+

Lorem ipsum dolor sit amet...

+
+ + +

touch-action: pan-y

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-span-test_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-span-test_touch-manual.html new file mode 100644 index 0000000000..61f0e8d329 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-span-test_touch-manual.html @@ -0,0 +1,114 @@ + + + + Span touch-action test + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll black element DOWN moving your touch outside of the red border. Wait for description update.

+

Note: this test is for touch only

+
+ + Test span + +
+ + + +

touch-action: none

+
+

The following pointer types were detected: .

+
+
+ + \ No newline at end of file diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-svg-test_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-svg-test_touch-manual.html new file mode 100644 index 0000000000..e9dc9d78ee --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-svg-test_touch-manual.html @@ -0,0 +1,122 @@ + + + + SVG test + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll black element DOWN moving your touch outside of the red border. Wait for description update.

+

Note: this test is for touch only

+
+ + + Sorry, your browser does not support inline SVG. + +
+
+ + +

touch-action: none

+
+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-table-test_touch-manual.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-table-test_touch-manual.html new file mode 100644 index 0000000000..17d5a29575 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-table-test_touch-manual.html @@ -0,0 +1,145 @@ + + + + Table touch-action test + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Try to scroll element DOWN starting your touch over the 1st Row. Wait for description update.

+

Note: this test is for touch only

+
+ + + + + +
The caption, first row element, and cell 3 have touch-action: none.
Header 1 Cell 1 Cell 2
Header 2 Cell 3 Cell 4
Header 3 Cell 5 Cell 6
+
+
+ + + +

touch-action: none

+
+

The following pointer types were detected: .

+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerevent_touch-action-verification.html b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-verification.html new file mode 100644 index 0000000000..7800f2c9da --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerevent_touch-action-verification.html @@ -0,0 +1,91 @@ + + + + touch-action: basic verification + + + + + + + + + +

Pointer Events touch-action attribute support

+

Test Description: Test will automatically check parsing behaviour of various touch-action combinations.

+ +

touch-action: basic verification

+
+

The following pointer types were detected: .

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/dom/events/test/pointerevents/wpt/pointerlock/pointerevent_movementxy-manual.html b/dom/events/test/pointerevents/wpt/pointerlock/pointerevent_movementxy-manual.html new file mode 100644 index 0000000000..5b0edd3c61 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerlock/pointerevent_movementxy-manual.html @@ -0,0 +1,99 @@ + + + + Pointer Events properties tests + + + + + + + + + + +

Pointer Events movementX/Y attribute test

+

+

+ Test Description: This test checks the properties of pointer events that do not support hover. +
    +
  1. Press down on the black square.
  2. +
  3. Move your pointer slowly along a straight line to the red square.
  4. +
  5. Release the pointer when you are over the red square.
  6. +
+ + Test passes if the proper behavior of the events is observed. +

+
+
+
+ +
+
+ + + diff --git a/dom/events/test/pointerevents/wpt/pointerlock/resources/pointerevent_movementxy-iframe.html b/dom/events/test/pointerevents/wpt/pointerlock/resources/pointerevent_movementxy-iframe.html new file mode 100644 index 0000000000..627af3b61c --- /dev/null +++ b/dom/events/test/pointerevents/wpt/pointerlock/resources/pointerevent_movementxy-iframe.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/dom/events/test/pointerevents/wpt/resources/pointerevent_attributes_hoverable_pointers-iframe.html b/dom/events/test/pointerevents/wpt/resources/pointerevent_attributes_hoverable_pointers-iframe.html new file mode 100644 index 0000000000..5e55868282 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/resources/pointerevent_attributes_hoverable_pointers-iframe.html @@ -0,0 +1,10 @@ + + + + + + + +
+ + diff --git a/dom/events/test/pointerevents/wpt/resources/pointerevent_pointerId_scope-iframe.html b/dom/events/test/pointerevents/wpt/resources/pointerevent_pointerId_scope-iframe.html new file mode 100644 index 0000000000..ab33560b35 --- /dev/null +++ b/dom/events/test/pointerevents/wpt/resources/pointerevent_pointerId_scope-iframe.html @@ -0,0 +1,35 @@ + + + + + Pointer Events pointerdown tests + + + + + +
+
+ + diff --git a/dom/events/test/test_DataTransferItemList.html b/dom/events/test/test_DataTransferItemList.html new file mode 100644 index 0000000000..980d0d183f --- /dev/null +++ b/dom/events/test/test_DataTransferItemList.html @@ -0,0 +1,234 @@ + + + Tests for the DataTransferItemList object + + + + + + +

+ +
+ drag over here +
+ + + + + diff --git a/dom/events/test/test_accel_virtual_modifier.html b/dom/events/test/test_accel_virtual_modifier.html new file mode 100644 index 0000000000..6d98053fa2 --- /dev/null +++ b/dom/events/test/test_accel_virtual_modifier.html @@ -0,0 +1,90 @@ + + + + Test for DOM "Accel" virtual modifier + + + + +

+ +
+
+
+ + diff --git a/dom/events/test/test_addEventListenerExtraArg.html b/dom/events/test/test_addEventListenerExtraArg.html new file mode 100644 index 0000000000..58b18545de --- /dev/null +++ b/dom/events/test/test_addEventListenerExtraArg.html @@ -0,0 +1,31 @@ + + + + + + Test for Bug 828554 + + + + + +Mozilla Bug 828554 +

+ +
+
+ + diff --git a/dom/events/test/test_all_synthetic_events.html b/dom/events/test/test_all_synthetic_events.html new file mode 100644 index 0000000000..847dc1398b --- /dev/null +++ b/dom/events/test/test_all_synthetic_events.html @@ -0,0 +1,470 @@ + + + + Test all synthetic events + + + + + +

+ +
+
+
+ + diff --git a/dom/events/test/test_bug1003432.html b/dom/events/test/test_bug1003432.html new file mode 100644 index 0000000000..d74aefb886 --- /dev/null +++ b/dom/events/test/test_bug1003432.html @@ -0,0 +1,45 @@ + + + + + Test for Bug 1003432 + + + + +Mozilla Bug 1003432 +

+ +
+
+
+ + diff --git a/dom/events/test/test_bug1003432.js b/dom/events/test/test_bug1003432.js new file mode 100644 index 0000000000..93d408663f --- /dev/null +++ b/dom/events/test/test_bug1003432.js @@ -0,0 +1,31 @@ +addEventListener( + "foobar", + function(evt) { + postMessage({ + type: evt.type, + bubbles: evt.bubbles, + cancelable: evt.cancelable, + detail: evt.detail, + }); + }, + true +); + +addEventListener( + "message", + function(evt) { + // Test the constructor of CustomEvent + var e = new CustomEvent("foobar", { + bubbles: true, + cancelable: true, + detail: "test", + }); + dispatchEvent(e); + + // Test initCustomEvent + e = new CustomEvent("foobar"); + e.initCustomEvent("foobar", true, true, "test"); + dispatchEvent(e); + }, + true +); diff --git a/dom/events/test/test_bug1013412.html b/dom/events/test/test_bug1013412.html new file mode 100644 index 0000000000..938445bd66 --- /dev/null +++ b/dom/events/test/test_bug1013412.html @@ -0,0 +1,111 @@ + + + + + Test for Bug 1013412 + + + + + + + +Mozilla Bug 1013412 +

+
+

Scrolling the page should be async, but scrolling over the dark circle should not scroll the page and instead rotate the white ball.

+
+
+
+
+
+
+
+
+
+ + + diff --git a/dom/events/test/test_bug1017086_disable.html b/dom/events/test/test_bug1017086_disable.html new file mode 100644 index 0000000000..e8281cac35 --- /dev/null +++ b/dom/events/test/test_bug1017086_disable.html @@ -0,0 +1,41 @@ + + + + + + Test for Bug 1017086 + + + + + + + + + diff --git a/dom/events/test/test_bug1017086_enable.html b/dom/events/test/test_bug1017086_enable.html new file mode 100644 index 0000000000..df6572b86c --- /dev/null +++ b/dom/events/test/test_bug1017086_enable.html @@ -0,0 +1,43 @@ + + + + + + Test for Bug 1017086 + + + + + + + + + diff --git a/dom/events/test/test_bug1037990.html b/dom/events/test/test_bug1037990.html new file mode 100644 index 0000000000..c148debcf7 --- /dev/null +++ b/dom/events/test/test_bug1037990.html @@ -0,0 +1,61 @@ + + + + + + Test for Bug 1037990 + + + + +Mozilla Bug 1037990 +

+ +
+
+ + + diff --git a/dom/events/test/test_bug1079236.html b/dom/events/test/test_bug1079236.html new file mode 100644 index 0000000000..4c89101574 --- /dev/null +++ b/dom/events/test/test_bug1079236.html @@ -0,0 +1,66 @@ + + + + + + Test for Bug 1079236 + + + + + + +Mozilla Bug 1079236 +

+
+ +
+
+
+ + diff --git a/dom/events/test/test_bug1127588.html b/dom/events/test/test_bug1127588.html new file mode 100644 index 0000000000..7d00a68eee --- /dev/null +++ b/dom/events/test/test_bug1127588.html @@ -0,0 +1,61 @@ + + + + + + + + +Mozilla Bug 1127588 +

+