Skip to content

Commit

Permalink
[Interop] Deflake pointerevent_click_during_capture.html
Browse files Browse the repository at this point in the history
The test has been flaking for the auxclick action where the
middle-click drag is probably causing autoscroll in some platforms.

This CL changes the action to use the right mouse button instead, after
suppressing any context menu invocation.

Bug: 40851596
Change-Id: I4e36b3aceb75d5edcbd0c9599ada9f7af9ef7b78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5873347
Commit-Queue: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1358971}
  • Loading branch information
mustaqahmed authored and chromium-wpt-export-bot committed Sep 23, 2024
1 parent 754fa51 commit 64995b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pointerevents/pointerevent_click_during_capture.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@
target.addEventListener(ename, logEvent);
});
});
// Suppress context-menus at right-clicks.
parent.addEventListener("contextmenu", e => e.preventDefault());

function dragBetweenChildrenAndClickOnDone(from_child, to_child, test) {
let actions_promise = new test_driver.Actions();

const button_type = (event_to_test === "click")
? actions_promise.ButtonType.LEFT
: actions_promise.ButtonType.MIDDLE;
: actions_promise.ButtonType.RIGHT;

actions_promise.addPointer(test_pointer, pointer_type)
.pointerMove(0, 0, {origin:from_child})
Expand Down

0 comments on commit 64995b3

Please sign in to comment.