OLD | NEW |
| (Empty) |
1 <!doctype html> | |
2 <html> | |
3 <head> | |
4 <title>pointerup</title> | |
5 <meta name="viewport" content="width=device-width"> | |
6 <link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> | |
7 <script src="/resources/testharness.js"></script> | |
8 <script src="/resources/testharnessreport.js"></script> | |
9 <!-- Additional helper script for common checks across event types --> | |
10 <script type="text/javascript" src="pointerevent_support.js"></script> | |
11 </head> | |
12 <body onload="run()"> | |
13 <h1>pointerup</h1> | |
14 <h4>Test Description: This test checks if pointerup event triggers. Pres
s mouse left button and release it over the black rectangle or tap it if you are
using a touchscreen.</h4> | |
15 <div id="target0" style="background:black"></div> | |
16 <script> | |
17 var detected_pointertypes = {}; | |
18 var test_pointerEvent = async_test("pointerup event received"); | |
19 // showPointerTypes is defined in pointerevent_support.js | |
20 // Requirements: the callback function will reference the test_point
erEvent object and | |
21 // will fail unless the async_test is created with the var name "tes
t_pointerEvent". | |
22 add_completion_callback(showPointerTypes); | |
23 | |
24 function run() { | |
25 var target0 = document.getElementById("target0"); | |
26 | |
27 on_event(target0, "pointerup", function (event) { | |
28 detected_pointertypes[event.pointerType] = true; | |
29 test_pointerEvent.step(function () { | |
30 check_PointerEvent(event); | |
31 assert_equals(event.type, "pointerup", "Pointer Event re
ceived."); | |
32 }); | |
33 test_pointerEvent.done(); | |
34 }); | |
35 } | |
36 </script> | |
37 <h1>Pointer Events pointerup tests</h1> | |
38 <div id="complete-notice"> | |
39 <p>The following pointer types were detected: <span id="pointertype-
log"></span>.</p> | |
40 <p>Refresh the page to run the tests again with a different pointer
type.</p> | |
41 </div> | |
42 <div id="log"></div> | |
43 </body> | |
44 </html> | |
OLD | NEW |