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

Simulate user inputs in pointerevents/pointerevent_touch-action-mouse.html #26653

Merged
merged 1 commit into from Jan 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -6,6 +6,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="pointerevent_support.js"></script>
<style>
#target0 {
Expand Down Expand Up @@ -86,6 +89,7 @@ <h4 id="desc">Test Description: Try to scroll text down using mouse (use mouse w
var target0 = document.getElementById("target0");

var test_touchaction = async_test("touch-action attribute test");
var actions_promise;

xScr0 = target0.scrollLeft;
yScr0 = target0.scrollTop;
Expand All @@ -111,10 +115,22 @@ <h4 id="desc">Test Description: Try to scroll text down using mouse (use mouse w
}

if(xScrollIsReceived && yScrollIsReceived) {
test_touchaction.done();
// Make sure the test finishes after all the input actions are completed.
actions_promise.then( () => {
test_touchaction.done();
});
updateDescriptionComplete();
}
});

const posOffsetX = 0;
const posOffsetY = 0;
const scrollDeltaX = 200;
const scrollDeltaY = 200;
actions_promise = new test_driver.Actions()
.scroll(posOffsetX, posOffsetY, scrollDeltaX, scrollDeltaY,
{origin: target0})
.send();
}

function updateDescriptionNextStepMouse() {
Expand Down