33 lines
1.0 KiB
HTML
33 lines
1.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset=utf-8>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
</head>
|
|
<body>
|
|
<script src="../../resources/testharness.js"></script>
|
|
<script src="../../resources/testharnessreport.js"></script>
|
|
<script src="../utils.js"></script>
|
|
<script>
|
|
|
|
'use strict';
|
|
|
|
target_test({ width: "200px", height: "200px" }, (target, test) => {
|
|
const eventTracker = new EventTracker(target, ["pointerover", "pointerenter", "pointerdown", "pointerup", "pointerout", "pointerleave"]);
|
|
|
|
ui.tap({ x: 100, y: 100 }).then(() => {
|
|
eventTracker.assertMatchesEvents([
|
|
{ type: "pointerover", isTrusted: true },
|
|
{ type: "pointerenter", isTrusted: true },
|
|
{ type: "pointerdown", isTrusted: true },
|
|
{ type: "pointerup", isTrusted: true },
|
|
{ type: "pointerout", isTrusted: true },
|
|
{ type: "pointerleave", isTrusted: true },
|
|
]);
|
|
test.done();
|
|
});
|
|
}, `Testing that isTrusted is true for pointer events.`);
|
|
|
|
</script>
|
|
</body>
|
|
</html> |