Skip to content

Commit

Permalink
Part 1: Modify wpt pointerevent_releasepointercapture_release_right_a…
Browse files Browse the repository at this point in the history
…fter_capture-manual.html to use WebDriver

Depends on D102057

Differential Revision: https://phabricator.services.mozilla.com/D102058

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1687066
gecko-commit: 9da5d0b7557fce8361689c78931ab4c1bd07bd52
gecko-reviewers: masayuki
  • Loading branch information
EdgarChen authored and moz-wptsync-bot committed Jan 18, 2021
1 parent c9e17b2 commit ca0a6c0
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
<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>
<script type="text/javascript">
var actions_promise;
var detected_pointertypes = {};
add_completion_callback(showPointerTypes);
var test_setPointerCapture = async_test("Release pointer capture right after setpointercapture");
Expand Down Expand Up @@ -36,8 +40,19 @@
});

on_event(target0, "pointerup", function (event) {
test_setPointerCapture.done();
// Make sure the test finishes after all the input actions are completed.
actions_promise.then( () => {
test_setPointerCapture.done();
});
});

// Inject mouse inputs.
actions_promise = new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerDown()
.pointerMove(10, 10, {origin: target0})
.pointerUp()
.send();
}
</script>
</head>
Expand Down

0 comments on commit ca0a6c0

Please sign in to comment.