| Index: content/test/data/page_with_touch_handler.html
|
| diff --git a/content/test/data/page_with_touch_handler.html b/content/test/data/page_with_touch_handler.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..80ac303d340ad848b55ed48df0f722c4589e971c
|
| --- /dev/null
|
| +++ b/content/test/data/page_with_touch_handler.html
|
| @@ -0,0 +1,40 @@
|
| +<!DOCTYPE html>
|
| +<html style="width: 100%; height: 100%">
|
| +<head>
|
| + <script>
|
| + function touchHandler(e, type) {
|
| + var touchResult = document.getElementById("last-touch-event");
|
| + touchResult.innerHTML = type;
|
| + }
|
| +
|
| + function getLastTouchEvent() {
|
| + var touchResult = document.getElementById("last-touch-event");
|
| + return touchResult.innerHTML;
|
| + }
|
| +
|
| + window.addEventListener('load', function(){ // on page load
|
| + document.body.addEventListener('touchstart',
|
| + function(e){
|
| + touchHandler(e, "touchstart");
|
| + }, false);
|
| +
|
| + document.body.addEventListener('touchmove',
|
| + function(e){
|
| + touchHandler(e, "touchmove");
|
| + }, false);
|
| +
|
| + document.body.addEventListener('touchend',
|
| + function(e){
|
| + touchHandler(e, "touchend");
|
| + }, false);
|
| + }, false);
|
| + </script>
|
| +</head>
|
| +
|
| +<!-- Be sure to set 100% width/height so the test can determine an appropriate
|
| + screen region for targeting events. -->
|
| +<body style="width: 100%; height: 100%">
|
| + Page with Touch Handler
|
| + <div id="last-touch-event">noevent</div>
|
| +</body>
|
| +</html>
|
|
|