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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-on-object.html

Issue 2517603002: Fired PointerEvent from Node::dispatchMouseEvent() to fix a bug. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4
5 <style>
6 #obj {
7 width: 50px;
8 height: 50px;
9 padding: 50px;
10 }
11 </style>
12
13 <h1>Verifies that mouse activites on an object fire pointerevents</h1>
14
15 <object id="obj"></object>
16
17 <div id="log"></div>
18
19 <script>
20 var receivedEvents = [];
21
22 function testReceivedEvents(expectedEvents, testLabel) {
23 test(function() {
24 assert_array_equals(receivedEvents, expectedEvents);
25 }, testLabel);
26 receivedEvents = [];
27 }
28
29 function init() {
30 ["mousedown", "mouseup", "mousemove", "pointerdown", "pointerup", "pointermove "].forEach(function(eventName) {
31 document.getElementById("obj").addEventListener(eventName, function(event) {
32 receivedEvents.push(event.type);
33 });
34 });
35 }
36
37 function runTests() {
38 var rect = document.getElementById("obj").getBoundingClientRect();
39
40 eventSender.mouseMoveTo(rect.left + 5, rect.top + 5);
41 eventSender.mouseDown(0);
42 eventSender.mouseUp(0);
43 testReceivedEvents(["pointermove", "mousemove", "pointerdown", "mousedown", "p ointerup", "mouseup"], "Click on object");
44
45 eventSender.mouseDown(0);
46 eventSender.mouseMoveTo(rect.left - 5, rect.top -5);
47 eventSender.mouseUp(0);
48 testReceivedEvents(["pointerdown", "mousedown", "pointermove", "mousemove", "p ointerup", "mouseup"], "Drag from object");
49 }
50
51 test(function() {
52 if (!window.eventSender)
53 assert_true(true, "No eventSender, skipped tests");
54 else {
55 init();
56 runTests();
57 }
58
59 done();
60 }, "Verifies that mouse activites on an object fire pointerevents");
61 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698