Skip to content

Commit

Permalink
Bug 1887921 [wpt PR 45315] - Update boundary PointerEvent expectation…
Browse files Browse the repository at this point in the history
…s after DOM changes., a=testonly

Automatic update from web-platform-tests
Update boundary PointerEvent expectations after DOM changes.

web-platform-tests/interop#380

Fixed: 330373899, 324724870
Change-Id: I5357aa410f499c39bde54c42ccb0c8f00dbccfb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5392700
Reviewed-by: Robert Flack <[email protected]>
Commit-Queue: Mustaq Ahmed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1277753}

--

wpt-commits: 46a22eed46be755f2e72cab868e51a0b62770fd4
wpt-pr: 45315
  • Loading branch information
mustaqahmed authored and moz-wptsync-bot committed Mar 28, 2024
1 parent e4485a8 commit e32381e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 68 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE HTML>
<title>Enter/leave events fired to parent after child is added</title>
<link rel="help" href="https://w3c.github.io/pointerevents/#firing-events-using-the-pointerevent-interface">
<meta name="variant" content="?mouse">
<meta name="variant" content="?touch">
<meta name="variant" content="?pen">
Expand Down Expand Up @@ -92,9 +93,6 @@

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 @@ -136,9 +134,6 @@

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 @@ -164,57 +159,29 @@
setup();

// Tests for dispatched pointer events.
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("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("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",
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("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("pointerup", "pointer", [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "pointerup@child", "(child-moved)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!DOCTYPE HTML>
<link rel="help" href="https://w3c.github.io/pointerevents/#firing-events-using-the-pointerevent-interface">
<title>Enter/leave events fired to parent after child is removed</title>
<meta name="variant" content="?mouse">
<meta name="variant" content="?touch">
Expand Down Expand Up @@ -104,24 +105,12 @@
setup();

// Tests for dispatched pointer events.
addPromiseTest("pointerdown", "pointer",
pointer_type == "mouse"
// `pointerup` after removing the child should not cause `pointerover`
// on the parent if the pointer type is hoverable because pointer boundary
// events should be fired only when the hoverable pointer is actually
// moved.
? [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "(child-removed)", "pointerup@parent",
"pointerover@parent", "pointerdown@parent", "pointerup@parent",
"pointerout@parent", "pointerleave@parent"
]
: [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "(child-removed)", "pointerover@parent", "pointerup@parent",
"pointerdown@parent", "pointerup@parent",
"pointerout@parent", "pointerleave@parent"
]);
addPromiseTest("pointerdown", "pointer", [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "(child-removed)", "pointerover@parent", "pointerup@parent",
"pointerdown@parent", "pointerup@parent",
"pointerout@parent", "pointerleave@parent"
]);
addPromiseTest("pointerup", "pointer", [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "pointerup@child", "(child-removed)",
Expand Down

0 comments on commit e32381e

Please sign in to comment.