From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../tests/uievents/mouse/attributes.html | 61 ++++++ .../mouse/cancel-mousedown-in-subframe.html | 64 ++++++ .../mouse/layout_change_should_fire_mouseover.html | 97 +++++++++ ...ry_events_after_removing_last_over_element.html | 153 +++++++++++++ .../uievents/mouse/mouse_buttons_back_forward.html | 56 +++++ .../mouse/mouseenter-mouseleave-on-drag.html | 187 ++++++++++++++++ .../uievents/mouse/mouseevent_move_button.html | 102 +++++++++ ...mousemove_prevent_default_action.tentative.html | 98 +++++++++ .../mouseover-at-removing-mousedown-target.html | 81 +++++++ .../resources/mouse-event-reporter-subframe.html | 37 ++++ .../tests/uievents/mouse/resources/utils.js | 35 +++ ...utton-state-after-target-removed.tentative.html | 240 +++++++++++++++++++++ 12 files changed, 1211 insertions(+) create mode 100644 testing/web-platform/tests/uievents/mouse/attributes.html create mode 100644 testing/web-platform/tests/uievents/mouse/cancel-mousedown-in-subframe.html create mode 100644 testing/web-platform/tests/uievents/mouse/layout_change_should_fire_mouseover.html create mode 100644 testing/web-platform/tests/uievents/mouse/mouse_boundary_events_after_removing_last_over_element.html create mode 100644 testing/web-platform/tests/uievents/mouse/mouse_buttons_back_forward.html create mode 100644 testing/web-platform/tests/uievents/mouse/mouseenter-mouseleave-on-drag.html create mode 100644 testing/web-platform/tests/uievents/mouse/mouseevent_move_button.html create mode 100644 testing/web-platform/tests/uievents/mouse/mousemove_prevent_default_action.tentative.html create mode 100644 testing/web-platform/tests/uievents/mouse/mouseover-at-removing-mousedown-target.html create mode 100644 testing/web-platform/tests/uievents/mouse/resources/mouse-event-reporter-subframe.html create mode 100644 testing/web-platform/tests/uievents/mouse/resources/utils.js create mode 100644 testing/web-platform/tests/uievents/mouse/synthetic-mouse-enter-leave-over-out-button-state-after-target-removed.tentative.html (limited to 'testing/web-platform/tests/uievents/mouse') diff --git a/testing/web-platform/tests/uievents/mouse/attributes.html b/testing/web-platform/tests/uievents/mouse/attributes.html new file mode 100644 index 0000000000..bbc388445c --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/attributes.html @@ -0,0 +1,61 @@ + +MouseEvent attributes + + + + + + + +Left Right + + diff --git a/testing/web-platform/tests/uievents/mouse/cancel-mousedown-in-subframe.html b/testing/web-platform/tests/uievents/mouse/cancel-mousedown-in-subframe.html new file mode 100644 index 0000000000..0735037735 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/cancel-mousedown-in-subframe.html @@ -0,0 +1,64 @@ + + + + + + + + +
+ Dragging the mouse from child frame to parent frame causes both mousedown and + mouseup events being dispatched to child frame, regardless of whether the + mousedown event is canceled or not. +
+ + + diff --git a/testing/web-platform/tests/uievents/mouse/layout_change_should_fire_mouseover.html b/testing/web-platform/tests/uievents/mouse/layout_change_should_fire_mouseover.html new file mode 100644 index 0000000000..49257ae60d --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/layout_change_should_fire_mouseover.html @@ -0,0 +1,97 @@ + + + + Mouseover/enter is sent on layout change + + + + + + + + + +
+
+

Test Description: Tests that the mouseover event is fired and the element has a hover effect when the element underneath the mouse cursor is changed. +
    +
  1. Put your mouse over the red rectangle
  2. +
  3. Click the primary mouse button
  4. +
+

+ + + diff --git a/testing/web-platform/tests/uievents/mouse/mouse_boundary_events_after_removing_last_over_element.html b/testing/web-platform/tests/uievents/mouse/mouse_boundary_events_after_removing_last_over_element.html new file mode 100644 index 0000000000..817c5d9ecc --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/mouse_boundary_events_after_removing_last_over_element.html @@ -0,0 +1,153 @@ + + + + +Redundant "mouseenter" shouldn't be fired without "mouseleave"s + + + + + + + + + diff --git a/testing/web-platform/tests/uievents/mouse/mouse_buttons_back_forward.html b/testing/web-platform/tests/uievents/mouse/mouse_buttons_back_forward.html new file mode 100644 index 0000000000..2323bc1026 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/mouse_buttons_back_forward.html @@ -0,0 +1,56 @@ + + + + + Mouse Button Back/Forward + + + + + + + + + + +

Test Description: Tests that the mouseup event is prevented. +
    +
  1. Click the back mouse button
  2. +
  3. Click the back mouse forward
  4. +
+

+ + diff --git a/testing/web-platform/tests/uievents/mouse/mouseenter-mouseleave-on-drag.html b/testing/web-platform/tests/uievents/mouse/mouseenter-mouseleave-on-drag.html new file mode 100644 index 0000000000..c36a1501c0 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/mouseenter-mouseleave-on-drag.html @@ -0,0 +1,187 @@ + + + + Test for redundant mouseenter or mouseleave events + + + + + + + + + + +
+
+
+ + + diff --git a/testing/web-platform/tests/uievents/mouse/mouseevent_move_button.html b/testing/web-platform/tests/uievents/mouse/mouseevent_move_button.html new file mode 100644 index 0000000000..edde11d022 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/mouseevent_move_button.html @@ -0,0 +1,102 @@ + + + + Mouse Events with button depressed + + + + + + + + + + +

Mouse Events

+

Test Description: This test checks if mouse events set button property correctly +
    +
  1. Put your mouse over the green rectangle
  2. +
  3. Press a non-primary button and hold it
  4. +
  5. Drag mouse to blue rectangle
  6. +
  7. Release mouse button
  8. +
+

+
+
+
+
+ + + diff --git a/testing/web-platform/tests/uievents/mouse/mousemove_prevent_default_action.tentative.html b/testing/web-platform/tests/uievents/mouse/mousemove_prevent_default_action.tentative.html new file mode 100644 index 0000000000..4caf98087f --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/mousemove_prevent_default_action.tentative.html @@ -0,0 +1,98 @@ + + +mousemove event: preventDefault() + + + + + + + + + + +
div a
+
div b
+
div c
+ + + diff --git a/testing/web-platform/tests/uievents/mouse/mouseover-at-removing-mousedown-target.html b/testing/web-platform/tests/uievents/mouse/mouseover-at-removing-mousedown-target.html new file mode 100644 index 0000000000..959dcef681 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/mouseover-at-removing-mousedown-target.html @@ -0,0 +1,81 @@ + + + + + + + +Check whether `mouseup` events are fired after pending boundary events + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/uievents/mouse/resources/mouse-event-reporter-subframe.html b/testing/web-platform/tests/uievents/mouse/resources/mouse-event-reporter-subframe.html new file mode 100644 index 0000000000..f12f429491 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/resources/mouse-event-reporter-subframe.html @@ -0,0 +1,37 @@ + + + + +
Child frame
+ + diff --git a/testing/web-platform/tests/uievents/mouse/resources/utils.js b/testing/web-platform/tests/uievents/mouse/resources/utils.js new file mode 100644 index 0000000000..6f5f6f4b6c --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/resources/utils.js @@ -0,0 +1,35 @@ +// Sends to Window |w| the object |{type, param}|. +function sendMessage(w, type, param) { + w.postMessage({"type": type, "param": param}, "*"); +} + +// Returns a |Promise| that gets resolved with the event object when |target| +// receives an event of type |event_type|. +function getEvent(event_type, target) { + return new Promise(resolve => { + target.addEventListener(event_type, e => resolve(e), {once: true}); + }); +} + +// Adds a listener that is automatically removed at the end of the test. +function addTestScopedListener(target, type, listener, test) { + target.addEventListener(type, listener); + test.add_cleanup(() => { + target.removeEventListener(type, listener); + }); +} + +// Returns a |Promise| that gets resolved with |event.data| when |window| +// receives from |source| a "message" event whose |event.data.type| matches the string +// |message_data_type|. +function getMessageData(message_data_type, source) { + return new Promise(resolve => { + function waitAndRemove(e) { + if (e.source != source || !e.data || e.data.type != message_data_type) + return; + window.removeEventListener("message", waitAndRemove); + resolve(e.data); + } + window.addEventListener("message", waitAndRemove); + }); +} diff --git a/testing/web-platform/tests/uievents/mouse/synthetic-mouse-enter-leave-over-out-button-state-after-target-removed.tentative.html b/testing/web-platform/tests/uievents/mouse/synthetic-mouse-enter-leave-over-out-button-state-after-target-removed.tentative.html new file mode 100644 index 0000000000..fad82f850d --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/synthetic-mouse-enter-leave-over-out-button-state-after-target-removed.tentative.html @@ -0,0 +1,240 @@ + + + + + + +Testing button state of synthesized mouse(out|over|leave|enter) events + + + + + + + + +
abc
+ + + -- cgit v1.2.3