| <!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", "pointercancel", "pointerout", "pointerover", "pointerup"]); |
| |
| 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: "pointercancel", 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 with cancelation.`); |
| |
| </script> |
| </body> |
| </html> |