Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / input / dispatchTouchEvent.html
blob640e9d2f1116b14ac3ab772fe69130ff2466d299
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
4 <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);
14 if (event.shiftKey)
15 log("shiftKey");
16 log("----Touches----");
17 for (var i = 0; i < event.touches.length; i++) {
18 var touch = event.touches[i];
19 log("id: " + 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);
29 function test()
31 var events = [
33 "type": "touchStart",
34 "touchPoints": [
36 "state": "touchPressed",
37 "x": 100,
38 "y": 200
43 "type": "touchMove",
44 "touchPoints": [
46 "state": "touchMoved",
47 "x": 100,
48 "y": 200
53 "type": "touchEnd",
54 "touchPoints": [
56 "state": "touchReleased",
57 "x": 100,
58 "y": 200
63 "type": "touchStart",
64 "touchPoints": [
66 "state": "touchPressed",
67 "x": 20,
68 "y": 30,
69 "id": 0
72 "state": "touchPressed",
73 "x": 100,
74 "y": 200,
75 "radiusX": 5,
76 "radiusY": 6,
77 "rotationAngle": 1.0,
78 "force": 0.0,
79 "id": 1
82 "modifiers": 8 // shift
85 "type": "touchEnd",
86 "touchPoints": [
88 "state": "touchReleased",
89 "x": 100,
90 "y": 100,
91 "id": 0
94 "state": "touchReleased",
95 "x": 100,
96 "y": 200,
97 "id": 1
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)
108 if (msg.error)
109 InspectorTest.log("Error: " + msg.error.message);
110 if (isLastCommand)
111 InspectorTest.completeTest();
115 </script>
116 </head>
117 <body onload="runTest()">
118 </body>
119 </html>