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

Side by Side Diff: chrome/test/data/chromedriver/touch_action_tests.html

Issue 2349463002: [chromedriver] Prevent touch_action_tests.html from reflowing during gestures. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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 <html lang="en"> 2 <html lang="en">
3 <head> 3 <head>
4 <meta charset="UTF-8"> 4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width,minimum-scale=1"> 5 <meta name="viewport" content="width=device-width,minimum-scale=1">
6 <title>Touch Action Test Page</title> 6 <title>Touch Action Test Page</title>
7 </head> 7 </head>
8 <body> 8 <body>
9 <div id="target"> 9 <div id="target">
10 Events are logged when tests touch this div. 10 Events are logged when tests touch this div.
11 </div> 11 </div>
12 <div id="events">events: </div> 12 <!-- use "white-space:nowrap;" to prevent page reflows while swiping, see
13 https://bugs.chromium.org/p/chromedriver/issues/detail?id=1508 -->
14 <div id="events" style="white-space:nowrap;">events: </div>
13 <div id="padding"> 15 <div id="padding">
14 We need some padding here so that the page is large enough to test swipe 16 We need some padding here so that the page is large enough to test swipe
15 and scroll actions. 17 and scroll actions.
16 </div> 18 </div>
17 <div id="bottom">This is the bottom of the page.</div> 19 <div id="bottom">This is the bottom of the page.</div>
18 <script> 20 <script>
19 events = document.getElementById('events'); 21 events = document.getElementById('events');
20 var eventTypes = ['touchstart', 'touchend', 'touchmove', 'touchcancel']; 22 var eventTypes = ['touchstart', 'touchend', 'touchmove', 'touchcancel'];
21 var eventListener = function(evt) { 23 var eventListener = function(evt) {
22 events.innerHTML += ' ' + evt.type; 24 events.innerHTML += ' ' + evt.type;
23 }; 25 };
24 26
25 var target = document.getElementById('target'); 27 var target = document.getElementById('target');
26 for (var i = 0; i < eventTypes.length; i++) { 28 for (var i = 0; i < eventTypes.length; i++) {
27 target.addEventListener(eventTypes[i], eventListener); 29 target.addEventListener(eventTypes[i], eventListener);
28 } 30 }
29 31
30 var padding = document.getElementById('padding'); 32 var padding = document.getElementById('padding');
31 padding.style.border = 'solid'; 33 padding.style.border = 'solid';
32 padding.style.height = window.screen.height * 2 + 'px'; 34 padding.style.height = window.screen.height * 2 + 'px';
33 padding.style.width = window.screen.width * 2 + 'px'; 35 padding.style.width = window.screen.width * 2 + 'px';
34 </script> 36 </script>
35 </body> 37 </body>
36 </html> 38 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698