31 lines
796 B
HTML
31 lines
796 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset=utf-8>
|
|
</head>
|
|
<body>
|
|
<script src="../../resources/testharness.js"></script>
|
|
<script src="../../resources/testharnessreport.js"></script>
|
|
<script src="../utils.js"></script>
|
|
<script>
|
|
|
|
'use strict';
|
|
|
|
target_test((target, test) => {
|
|
const eventTracker = new EventTracker(target, ["pointerdown", "pointerup"]);
|
|
|
|
// Click without a move.
|
|
eventSender.mouseMoveTo(50, 50);
|
|
eventSender.mouseDown();
|
|
eventSender.mouseUp();
|
|
|
|
eventTracker.assertMatchesEvents([
|
|
{ type : "pointerdown", x: 50, y: 50, button: 0, buttons: 1 },
|
|
{ type : "pointerup", x: 50, y: 50, button: 0, buttons: 0 },
|
|
]);
|
|
test.done();
|
|
}, `Testing that the "button" and "buttons" properties report the expected values.`);
|
|
|
|
</script>
|
|
</body>
|
|
</html> |