Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html b/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html |
| index f141e8c2f62b1cca13672f2380f7ca1c996a2d7d..422d4e5451204e22b1e21aa4fa6a73fc1d19f27f 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html |
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/input/emulateTouchFromMouseEvent.html |
| @@ -3,10 +3,14 @@ |
| <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> |
| <script> |
| -window.addEventListener("touchstart", logEvent); |
| -window.addEventListener("touchend", logEvent); |
| -window.addEventListener("touchmove", logEvent); |
| -window.addEventListener("touchcancel", logEvent); |
| +function setupAndRunTest() { |
| + var content = document.getElementById("content"); |
| + 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
|
| + content.addEventListener("touchend", logEvent); |
| + content.addEventListener("touchmove", logEvent); |
| + content.addEventListener("touchcancel", logEvent); |
| + runTest(); |
| +} |
| function logEvent(event) |
| { |
| @@ -125,6 +129,8 @@ function test() |
| </script> |
| </head> |
| -<body onload="runTest()"> |
| +<body onload="setupAndRunTest()"> |
| +<div style="width: 100%; height: 100%" id="content"> |
| +</div> |
| </body> |
| </html> |