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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html

Issue 2127163002: Limit PassiveDocumentEventListeners to touch and make it experimental (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A few more layout tests 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script> 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script> 4 <script>
5 5
6 window.addEventListener("touchstart", logEvent); 6 function setupAndRunTest() {
7 window.addEventListener("touchend", logEvent); 7 var content = document.getElementById("content");
8 window.addEventListener("touchmove", logEvent); 8 content.addEventListener("touchstart", logEvent);
Rick Byers 2016/07/07 20:02:09 any reason to change the target instead of making
dtapuska 2016/07/07 20:34:21 Again; trying to future proof it but I don't have
9 window.addEventListener("touchcancel", logEvent); 9 content.addEventListener("touchend", logEvent);
10 content.addEventListener("touchmove", logEvent);
11 content.addEventListener("touchcancel", logEvent);
12 runTest();
13 }
10 14
11 function logEvent(event) 15 function logEvent(event)
12 { 16 {
13 event.preventDefault(); 17 event.preventDefault();
14 log("-----Event-----"); 18 log("-----Event-----");
15 log("type: " + event.type); 19 log("type: " + event.type);
16 if (event.shiftKey) 20 if (event.shiftKey)
17 log("shiftKey"); 21 log("shiftKey");
18 log("----Touches----"); 22 log("----Touches----");
19 for (var i = 0; i < event.touches.length; i++) { 23 for (var i = 0; i < event.touches.length; i++) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 InspectorTest.completeTest(); 122 InspectorTest.completeTest();
119 } 123 }
120 124
121 InspectorTest.sendCommand("Page.enable", {}, function() { 125 InspectorTest.sendCommand("Page.enable", {}, function() {
122 InspectorTest.sendCommand("Page.setTouchEmulationEnabled", { enabled: tr ue }, sendNextEvent); 126 InspectorTest.sendCommand("Page.setTouchEmulationEnabled", { enabled: tr ue }, sendNextEvent);
123 }); 127 });
124 } 128 }
125 129
126 </script> 130 </script>
127 </head> 131 </head>
128 <body onload="runTest()"> 132 <body onload="setupAndRunTest()">
133 <div style="width: 100%; height: 100%" id="content">
134 </div>
129 </body> 135 </body>
130 </html> 136 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698