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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/pointerevents/touch-pointercancel.html

Issue 1815683002: Add pointer transition events to the touch test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/virtual/pointerevent/fast/events/pointerevents/touch-pointercancel-expected.txt » ('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/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 <style> 3 <style>
4 div.test { 4 div.test {
5 margin: 10px; 5 margin: 10px;
6 width: 100px; 6 width: 100px;
7 height: 200px; 7 height: 200px;
8 overflow: scroll; 8 overflow: scroll;
9 border: solid 1px; 9 border: solid 1px;
10 float: left; 10 float: left;
11 } 11 }
12 </style> 12 </style>
13 13
14 <div id="target" class="test"></div> 14 <div id="target" class="test"></div>
15 15
16 <div id="console"></div> 16 <div id="console"></div>
17 17
18 <script> 18 <script>
19 description("Verifies that pointercancel events are fired correctly on touch."); 19 description("Verifies that pointercancel events are fired correctly on touch.");
20 20
21 var eventToPreventDefault = ""; 21 var eventToPreventDefault = "";
22 22
23 function init() { 23 function init() {
24 var eventList = ["pointerdown", "pointerup", "pointermove", "pointercancel", 24 var eventList = ["pointerdown", "pointerup", "pointermove", "pointercancel", " pointerover", "pointerenter", "pointerout", "pointerleave",
25 "touchstart", "touchend", "touchmove", "touchcancel"]; 25 "touchstart", "touchend", "touchmove", "touchcancel"];
26 26
27 eventList.forEach(function(eventName) { 27 eventList.forEach(function(eventName) {
28 document.getElementById("target").addEventListener(eventName, function(event ) { 28 document.getElementById("target").addEventListener(eventName, function(event ) {
29 var idMsg; 29 var idMsg;
30 if (event.type.startsWith("pointer")) 30 if (event.type.startsWith("pointer"))
31 idMsg = ", pointerId=" + event.pointerId; 31 idMsg = ", pointerId=" + event.pointerId;
32 else { 32 else {
33 idMsg = ", touchIds="; 33 idMsg = ", touchIds=";
34 touches = event.changedTouches; 34 touches = event.changedTouches;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 202
203 203
204 init(); 204 init();
205 if (window.eventSender) 205 if (window.eventSender)
206 runTests(); 206 runTests();
207 else 207 else
208 debug("This test requires eventSender"); 208 debug("This test requires eventSender");
209 209
210 </script> 210 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-pointercancel-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698