Bug 1675229 [wpt PR 26367] - WPT to check click/auxclick/contextmenu are pointerevents, a=testonly

Automatic update from web-platform-tests
WPT to check click/auxclick/contextmenu are pointerevents

Verify that the user agent returns click/auxclick/contextmenu as pointerevents.

Bug: 989958
Change-Id: I02757ef704b605471614829177cba24a73b6c8db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2513801
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823332}

--

wpt-commits: c81e292adb1f857ac460654dc2941e223a17e438
wpt-pr: 26367
This commit is contained in:
Liviu Tinta 2020-11-05 14:18:45 +00:00 коммит произвёл moz-wptsync-bot
Родитель d8a8613761
Коммит 7eb82304d1
3 изменённых файлов: 67 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,24 @@
<!DOCTYPE HTML>
<title>auxclick is a PointerEvent</title>
<link rel="help" href="https://github.com/w3c/pointerevents/pull/317">
<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>
<input id="target" style="margin: 20px">
<script>
'use strict';
let auxclickTest = async_test("auxclick is a PointerEvent");
target.addEventListener("auxclick", auxclickTest.step_func_done((e)=>{
assert_true(e instanceof PointerEvent, "auxclick should be a PointerEvent");
}));
let actions = new test_driver.Actions();
actions.pointerMove(0,0, {origin:target})
.pointerDown({button:actions.ButtonType.MIDDLE})
.pointerUp({button:actions.ButtonType.MIDDLE})
.send();
</script>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<title>click is a PointerEvent</title>
<link rel="help" href="https://github.com/w3c/pointerevents/pull/317">
<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>
<input id="target" style="margin: 20px">
<script>
'use strict';
let clickTest = async_test("click is a PointerEvent");
target.addEventListener("click", clickTest.step_func_done((e)=>{
assert_true(e instanceof PointerEvent, "click should be a PointerEvent");
}));
let action = test_driver.click(target);
</script>

Просмотреть файл

@ -0,0 +1,24 @@
<!DOCTYPE HTML>
<title>contexmenu is a PointerEvent</title>
<link rel="help" href="https://github.com/w3c/pointerevents/pull/317">
<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>
<input id="target" style="margin: 20px">
<script>
'use strict';
let contextmenuTest = async_test("contextmenu is a PointerEvent");
target.addEventListener("contextmenu", contextmenuTest.step_func_done((e)=>{
assert_true(e instanceof PointerEvent, "contextmenu should be a PointerEvent");
}));
let actions = new test_driver.Actions();
actions.pointerMove(0,0, {origin:target})
.pointerDown({button:actions.ButtonType.RIGHT})
.pointerUp({button:actions.ButtonType.RIGHT})
.send();
</script>