| <!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, ["pointerdown", "pointerenter", "pointerleave", "pointermove", "pointerout", "pointerover", "pointerup"]); |
| target.style.touchAction = "none"; |
| |
| const one = ui.finger(); |
| ui.sequence([ |
| one.begin({ x: 10, y: 10 }), |
| one.move({ x: 100, y: 100 }), |
| one.end() |
| ]).then(() => { |
| eventTracker.assertMatchesEvents([ |
| { type: "pointerover", button: 0, buttons: 1 }, |
| { type: "pointerenter", button: 0, buttons: 1 }, |
| { type: "pointerdown", button: 0, buttons: 1 }, |
| { type: "pointermove", button: -1, buttons: 1 }, |
| { type: "pointerup", button: 0, buttons: 0 }, |
| { type: "pointerout", button: 0, buttons: 0 }, |
| { type: "pointerleave", button: 0, buttons: 0 }, |
| ]); |
| test.done(); |
| }); |
| }, `Testing the values of the button and buttons properties.`); |
| |
| </script> |
| </body> |
| </html> |