Commit f51e2865 authored by Liviu Tinta's avatar Liviu Tinta Committed by Commit Bot

Fix failing test pointerevent_mouse-on-object

action.pointerMove requires integers as arguments.

Change-Id: I6abacedba07090038aff38e9788eec5b0445d4f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332330
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Reviewed-by: default avatarLan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795467}
parent e461a061
......@@ -39,10 +39,13 @@ promise_test(async() => {
done_clicked = false;
receivedEvents = [];
await new test_driver.Actions().pointerMove(rect.left+5, rect.top+5).pointerDown(0).pointerUp(0).send().then(() => {
return clickInTarget("mouse", done);
});
await resolveWhen(()=>{return done_clicked;});
await new test_driver.Actions()
.pointerMove(Math.ceil(rect.left+5), Math.ceil(rect.top+5))
.pointerDown()
.pointerUp()
.send()
.then(() => clickInTarget("mouse", done));
await resolveWhen(() => done_clicked);
assert_array_equals(receivedEvents, ["pointermove", "mousemove", "pointerdown", "mousedown", "pointerup", "mouseup"],
"Click on object should result in the correct sequence of events");
......@@ -52,10 +55,14 @@ promise_test(async() => {
done_clicked = false;
receivedEvents = [];
await new test_driver.Actions().pointerMove(rect.left+5, rect.top+5).pointerDown(0).pointerMove(rect.left-5, rect.top-5).pointerUp(0).send().then(() => {
return clickInTarget("mouse", done);
});
await resolveWhen(()=>{return done_clicked;});
await new test_driver.Actions()
.pointerMove(Math.ceil(rect.left+5), Math.ceil(rect.top+5))
.pointerDown()
.pointerMove(Math.ceil(rect.left-5), Math.ceil(rect.top-5))
.pointerUp()
.send()
.then(() => clickInTarget("mouse", done));
await resolveWhen(() => done_clicked);
assert_array_equals(receivedEvents, ["pointermove", "mousemove", "pointerdown", "mousedown", "pointermove", "mousemove", "pointerup", "mouseup"],
"Drag from object should result in the correct sequence of events");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment