3 <script type=
"text/javascript" src=
"../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
6 window
.addEventListener("touchstart", logEvent
);
7 window
.addEventListener("touchend", logEvent
);
8 window
.addEventListener("touchmove", logEvent
);
10 function logEvent(event
)
12 log("-----Event-----");
13 log("type: " + event
.type
);
16 log("----Touches----");
17 for (var i
= 0; i
< event
.touches
.length
; i
++) {
18 var touch
= event
.touches
[i
];
20 log("pageX: " + touch
.pageX
);
21 log("pageY: " + touch
.pageY
);
22 log("radiusX: " + touch
.radiusX
);
23 log("radiusY: " + touch
.radiusY
);
24 log("rotationAngle: " + touch
.rotationAngle
);
25 log("force: " + touch
.force
);
36 "state": "touchPressed",
46 "state": "touchMoved",
56 "state": "touchReleased",
66 "state": "touchPressed",
72 "state": "touchPressed",
82 "modifiers": 8 // shift
88 "state": "touchReleased",
94 "state": "touchReleased",
103 for (var i
= 0; i
< events
.length
; i
++)
104 InspectorTest
.sendCommand("Input.dispatchTouchEvent", events
[i
], checkResponse
.bind(undefined, i
== events
.length
- 1));
106 function checkResponse(isLastCommand
, msg
)
109 InspectorTest
.log("Error: " + msg
.error
.message
);
111 InspectorTest
.completeTest();
117 <body onload=
"runTest()">