Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1885223] Update the pointer boundary event tests in pointerevent_after_target_appended.html to align with the spec #45192

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 50 additions & 16 deletions pointerevents/pointerevent_after_target_appended.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@

let actions = new test_driver.Actions()
.addPointer("TestPointer", pointer_type)
// The offset argument of pointerMove action is relative to the
// central point of the origin element. So this moves the pointer to
// the parent actually.
.pointerMove(-30, -30, {origin: parent})
.pointerDown()
.pointerUp()
Expand Down Expand Up @@ -133,6 +136,9 @@

let actions = new test_driver.Actions()
.addPointer("TestPointer", pointer_type)
// The offset argument of pointerMove action is relative to the
// central point of the origin element. So this moves the pointer to
// the parent actually.
.pointerMove(-30, -30, {origin: parent})
.pointerDown()
.pointerUp()
Expand All @@ -158,29 +164,57 @@
setup();

// Tests for dispatched pointer events.
addPromiseTestForNewChild("pointerdown", "pointer", [
"pointerover@parent", "pointerenter@parent",
"pointerdown@parent", "(child-attached)",
"pointerout@parent", "pointerover@child", "pointerenter@child",
"pointerup@child",
"pointerdown@child", "pointerup@child",
"pointerout@child", "pointerleave@child", "pointerleave@parent"
]);
addPromiseTestForNewChild(
"pointerdown",
"pointer",
pointer_type == "mouse"
// Pointer boundary events should be fired only when the hoverable pointer
// is actually moved and pointerup doesn't imply the pointer move.
? [
"pointerover@parent", "pointerenter@parent",
"pointerdown@parent", "(child-attached)", "pointerup@child",
"pointerout@parent", "pointerover@child", "pointerenter@child",
"pointerdown@child", "pointerup@child",
"pointerout@child", "pointerleave@child", "pointerleave@parent"
]
: [
"pointerover@parent", "pointerenter@parent",
"pointerdown@parent", "(child-attached)",
"pointerout@parent", "pointerover@child", "pointerenter@child",
"pointerup@child",
"pointerdown@child", "pointerup@child",
"pointerout@child", "pointerleave@child", "pointerleave@parent"
]
);
addPromiseTestForNewChild("pointerup", "pointer", [
"pointerover@parent", "pointerenter@parent",
"pointerdown@parent", "pointerup@parent", "(child-attached)",
"pointerout@parent", "pointerover@child", "pointerenter@child",
"pointerdown@child", "pointerup@child",
"pointerout@child", "pointerleave@child", "pointerleave@parent"
]);
addPromiseTestForMovedChild("pointerdown", "pointer", [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "(child-moved)",
"pointerover@child", "pointerenter@child",
"pointerup@child",
"pointerdown@child", "pointerup@child",
"pointerout@child", "pointerleave@child", "pointerleave@parent"
]);
addPromiseTestForMovedChild(
"pointerdown",
"pointer",
pointer_type == "mouse"
// Pointer boundary events should be fired only when the hoverable pointer
// is actually moved and pointerup doesn't imply the pointer move.
? [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "(child-moved)", "pointerup@child",
"pointerover@child", "pointerenter@child",
"pointerdown@child", "pointerup@child",
"pointerout@child", "pointerleave@child", "pointerleave@parent"
]
: [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "(child-moved)",
"pointerover@child", "pointerenter@child",
"pointerup@child",
"pointerdown@child", "pointerup@child",
"pointerout@child", "pointerleave@child", "pointerleave@parent"
]
);
addPromiseTestForMovedChild("pointerup", "pointer", [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "pointerup@child", "(child-moved)",
Expand Down