OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <head> |
| 4 <title>pointerout</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 <h2>pointerout</h2> |
| 14 <h4>Test Description: This test checks if pointerout event triggers. Put
your mouse over the black rectangle and then move it out of the rectangle bound
aries. If you are using touchscreen tap the black rectangle. </h4> |
| 15 <div id="target0" style="background: black"></div> |
| 16 <script> |
| 17 var test_pointerEvent = async_test("pointerout event received"); |
| 18 // showPointerTypes is defined in pointerevent_support.js |
| 19 // Requirements: the callback function will reference the test_point
erEvent object and |
| 20 // will fail unless the async_test is created with the var name "tes
t_pointerEvent". |
| 21 add_completion_callback(showPointerTypes); |
| 22 |
| 23 var eventTested = false; |
| 24 var detected_pointertypes = {}; |
| 25 |
| 26 function run() { |
| 27 var target0 = document.getElementById("target0"); |
| 28 |
| 29 on_event(target0, "pointerout", function (event) { |
| 30 detected_pointertypes[event.pointerType] = true; |
| 31 if (eventTested == false) { |
| 32 eventTested = true; |
| 33 check_PointerEvent(event); |
| 34 test_pointerEvent.done(); |
| 35 } |
| 36 }); |
| 37 } |
| 38 </script> |
| 39 <h1>Pointer Events pointerout tests</h1> |
| 40 <div id="complete-notice"> |
| 41 <p>The following pointer types were detected: <span id="pointertype-
log"></span>.</p> |
| 42 <p>Refresh the page to run the tests again with a different pointer
type.</p> |
| 43 </div> |
| 44 <div id="log"></div> |
| 45 </body> |
| 46 </html> |
OLD | NEW |