Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_pointerleave_mouse-manual.html

Issue 2341333002: Import wpt@1f2080f9ffa00ad27eb764b83fbc10960a95d6aa (Closed)
Patch Set: update win expectations Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <title>Pointer Event: Dispatch pointerleave (mouse). </title>
5 <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
6 <link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
7 <meta name="assert" content="When a pointing device that has continuous position (such as a mouse) leaves the hit test boundaries of an element, the poi nterleave event must be dispatched."/>
8 <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
9 <!-- /resources/testharness.js -->
10 <script src="/resources/testharness.js"></script>
11 <script src="/resources/testharnessreport.js"></script>
12 <!-- Additional helper script for common checks across event types -->
13 <script type="text/javascript" src="pointerevent_support.js"></script>
14 <script type="text/javascript">
15 var detected_pointertypes = {};
16 var test_pointerEvent = async_test("pointerleave event"); // set up test harness;
17 // showPointerTypes is defined in pointerevent_support.js
18 // Requirements: the callback function will reference the test_point erEvent object and
19 // will fail unless the async_test is created with the var name "tes t_pointerEvent".
20 add_completion_callback(showPointerTypes);
21
22 function run() {
23 var target0 = document.getElementById("target0");
24
25 on_event(target0, "pointerleave", function (event) {
26 detected_pointertypes[event.pointerType] = true;
27 check_PointerEvent(event);
28 test_pointerEvent.step(function () {
29 assert_equals(event.pointerType, "mouse", "Test should b e run using a mouse as input.");
30 assert_equals(event.type, "pointerleave", "The " + event .type + " event was received.");
31 });
32 test_pointerEvent.done(); // complete test
33 });
34 }
35 </script>
36 </head>
37 <body onload="run()">
38 <h1>Pointer Event: Dispatch pointerleave (mouse)</h1>
39 <h4>
40 Test Description:
41 When a pointing device that has continuous position (such as a mouse ) leaves the hit test boundaries of an element, the pointerleave event must be d ispatched.
42 </h4>
43 <br />
44 <div id="target0">
45 Use a mouse to move over then out of this element
46 </div>
47 <div id="complete-notice">
48 <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
49 <p>The following pointer types were detected: <span id="pointertype- log"></span>.</p>
50 </div>
51 <div id="log"></div>
52 </body>
53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698