Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / test / data / chromedriver / touch_action_tests.html
blob7f036dbb1430a2597ec4205bae4856629a8a696a
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width,initial-scale=1.0">
6 <title>Touch Action Test Page</title>
7 </head>
8 <body>
9 <div id="target">
10 Events are logged when tests touch this div.
11 </div>
12 <div id="events">events: </div>
13 <div id="padding">
14 We need some padding here so that the page is large enough to test swipe
15 and scroll actions.
16 </div>
17 <div id="bottom">This is the bottom of the page.</div>
18 <script>
19 events = document.getElementById('events');
20 var eventTypes = ['touchstart', 'touchend', 'touchmove', 'touchcancel'];
21 var eventListener = function(evt) {
22 events.innerHTML += ' ' + evt.type;
25 var target = document.getElementById('target');
26 for (var i = 0; i < eventTypes.length; i++) {
27 target.addEventListener(eventTypes[i], eventListener);
30 var padding = document.getElementById('padding');
31 padding.style.border = 'solid';
32 padding.style.height = window.screen.height * 2 + 'px';
33 padding.style.width = window.screen.width * 2 + 'px';
34 </script>
35 </body>
36 </html>