Commit 9693c35f authored by Liviu Tinta's avatar Liviu Tinta Committed by Commit Bot

Move pointerevent_mouse_pointercapture_inactivate_pointer to wpt

Test didn't require changes to convert to WPT. I've only added calls
to EventWatcher to wait for pointerup event to be done in order to avoid
flaky behaviour.

Change-Id: Ie7695b47b6f97769d5337b30e4810e94d339233f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2398946Reviewed-by: default avatarLan Wei <lanwei@chromium.org>
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805898}
parent 3c7b25df
<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../resources/testdriver.js"></script>
<script src="../../../resources/testdriver-vendor.js"></script>
<script src="../../../external/wpt/resources/testdriver-actions.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<style>
iframe {
width: 300px;
......@@ -50,19 +50,25 @@
});
promise_test(async() => {
promise_test(async(test) => {
let eventWatcher = new EventWatcher(test, document, ["pointerup"]);
let donePromise = eventWatcher.wait_for(["pointerup"], { record: 'all' });
await injectEvent(50, 50);
// wait for pointerUp before running the test
await donePromise;
assert_equals(capture_count, 0, "Inner frame can not capture when pointer is activate in outer frame")
}, "setPointerCapture: pointer active in outer frame, set capture to inner frame");
promise_test(async() => {
promise_test(async(test) => {
let eventWatcher = new EventWatcher(test, iframe.contentDocument, ["pointerup"]);
let donePromise = eventWatcher.wait_for(["pointerup"], { record: 'all' });
await injectEvent(250, 250);
// wait for pointerUp before running the test
await donePromise;
assert_equals(capture_count, 0, "Outer frame can not capture when pointer is activate in inner frame")
}, "setPointerCapture: pointer active in inner frame, set capture to outer frame");
function injectEvent(x, y) {
return new test_driver.Actions()
.pointerMove(x, y)
......
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