Index: trunk/src/chrome/test/data/devtools/touch_emulation.html |
=================================================================== |
--- trunk/src/chrome/test/data/devtools/touch_emulation.html (revision 271031) |
+++ trunk/src/chrome/test/data/devtools/touch_emulation.html (working copy) |
@@ -1,60 +0,0 @@ |
-<head> |
-<style> |
-div { |
- width: 400px; |
- height: 400px; |
-} |
-</style> |
-</head> |
- |
-<body> |
-<div></div> |
-<script> |
-var events = []; |
-var expectedEventsCount = null; |
-// Prevent default to disable gestures. |
-var preventDefault = true; |
- |
-function maybeSendEvents() { |
- if (expectedEventsCount === null) |
- return; |
- if (events.length < expectedEventsCount) |
- return; |
- |
- var result = events.join(" "); |
- events = []; |
- expectedEventsCount = null; |
- window.domAutomationController.send(result); |
-} |
- |
-function getEventNames(count) { |
- expectedEventsCount = count; |
- maybeSendEvents(); |
-} |
- |
-function onEvent(name, event) { |
- events.push(name); |
- if (preventDefault) |
- event.preventDefault(); |
- setTimeout(maybeSendEvents, 0); |
-} |
- |
-var names = [ |
- "touchstart", |
- "touchmove", |
- "touchend", |
- "touchcancel", |
- "mousedown", |
- "mouseup", |
- "mousemove", |
- "click" |
-]; |
- |
-for (var i = 0; i < names.length; ++i) { |
- document.querySelector("div").addEventListener( |
- names[i], |
- onEvent.bind(null, names[i]), |
- false); |
-} |
-</script> |
-</body> |