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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-chorded-buttons.html

Issue 2141993003: PointerEvents for long-press: fix double firing & canceling MEs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed formats. Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/pointerevents/touch-pointer-long-press.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <script src="../../../resources/testharness.js"></script> 2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script> 3 <script src="../../../resources/testharnessreport.js"></script>
4 4
5 <style> 5 <style>
6 div.box { 6 div.box {
7 margin: 10px; 7 margin: 10px;
8 padding: 50px; 8 padding: 50px;
9 float: left; 9 float: left;
10 } 10 }
11 </style> 11 </style>
12 12
13 <h1>PointerEvent: Verifies that chorded buttons fire appropriate events</h1>
14
15 <div id="target" class="box" style="background-color:red"></div>
16
17 <div id="log"></div>
18
13 <script> 19 <script>
14 var receivedEvents = []; 20 var receivedEvents = [];
15 var preventDefaultOnPointerDown = false; 21 var preventDefaultOnPointerDown = false;
16 22
17 function testReceivedEvents(expectedEvents, testLabel) { 23 function testReceivedEvents(expectedEvents, testLabel) {
18 test(function() { 24 test(function() {
19 assert_array_equals(receivedEvents, expectedEvents); 25 assert_array_equals(receivedEvents, expectedEvents);
20 }, testLabel); 26 }, testLabel);
21 receivedEvents = []; 27 receivedEvents = [];
22 } 28 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 testReceivedEvents([ 130 testReceivedEvents([
125 "pointerdown 0,1", 131 "pointerdown 0,1",
126 "pointermove 1,5", 132 "pointermove 1,5",
127 "pointermove 1,1", 133 "pointermove 1,1",
128 "pointerup 0,0", 134 "pointerup 0,0",
129 "pointerdown 0,1", "mousedown 0,1", 135 "pointerdown 0,1", "mousedown 0,1",
130 "pointerup 0,0", "mouseup 0,0" 136 "pointerup 0,0", "mouseup 0,0"
131 ], "LM button with preventDefault on pointerdown"); 137 ], "LM button with preventDefault on pointerdown");
132 } 138 }
133 139
134 function run() { 140 test(function() {
135 setup({explicit_done: true});
136
137 if (!window.eventSender) 141 if (!window.eventSender)
138 assert_true(true, "No eventSender, skipped tests"); 142 assert_true(true, "No eventSender, skipped tests");
139 else if (!window.PointerEvent) 143 else if (!window.PointerEvent)
140 assert_true(true, "No PointerEvent, skipped tests"); 144 assert_true(true, "No PointerEvent, skipped tests");
141 else { 145 else {
142 init(); 146 init();
143 runTests(); 147 runTests();
144 } 148 }
145 149
146 done(); 150 done();
147 } 151 }, "PointerEvent: Verifies that chorded buttons fire appropriate events");
148 </script> 152 </script>
149
150 <body onload="run()">
151 <h1>PointerEvent: Verifies that chorded buttons fire appropriate events</h1>
152
153 <div id="target" class="box" style="background-color:red"></div>
154
155 <div id="log"></div>
156 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/pointerevents/touch-pointer-long-press.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698