Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 var div = document.createElement("div"); | 1 var div = document.createElement("div"); |
| 2 div.id = "touchtarget"; | 2 div.id = "touchtarget"; |
| 3 div.style.width = "100px"; | 3 div.style.width = "100px"; |
| 4 div.style.height = "100px"; | 4 div.style.height = "100px"; |
| 5 div.style.backgroundColor = "blue"; | 5 div.style.backgroundColor = "blue"; |
| 6 | 6 |
| 7 var lastEvent = null; | 7 var lastEvent = null; |
| 8 var touchEventsReceived = 0; | 8 var touchEventsReceived = 0; |
| 9 var EXPECTED_TOUCH_EVENTS_TOTAL = 5; | 9 var EXPECTED_TOUCH_EVENTS_TOTAL = 5; |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 verifyTouchEvent("touchmove", 1, 1, 1); | 85 verifyTouchEvent("touchmove", 1, 1, 1); |
| 86 shouldBeEqualToString("lastEvent.touches[0].target.tagName", "DIV"); | 86 shouldBeEqualToString("lastEvent.touches[0].target.tagName", "DIV"); |
| 87 break; | 87 break; |
| 88 | 88 |
| 89 default: testFailed("Wrong number of touch events! (" + which + ")"); | 89 default: testFailed("Wrong number of touch events! (" + which + ")"); |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 | 92 |
| 93 function singleTouchSequence() | 93 function singleTouchSequence() |
| 94 { | 94 { |
| 95 if (eventSender.setTouchPointRadius) | 95 eventSender.addTouchPoint(10, 10, 10, 10); |
|
Rick Byers
2015/03/12 14:24:40
If we've got setTouchPointRadius, then let's just
d.pikalov
2015/03/16 16:48:44
There is problem - setTouchPointRadius() sets even
Rick Byers
2015/03/16 18:43:17
Ah, sorry I didn't appreciate that this was more c
| |
| 96 eventSender.setTouchPointRadius(10,10); | |
| 97 eventSender.addTouchPoint(10, 10); | |
| 98 eventSender.touchStart(); | 96 eventSender.touchStart(); |
| 99 | 97 |
| 100 if (eventSender.setTouchPointRadius) | 98 if (eventSender.setTouchPointRadius) |
| 101 eventSender.setTouchPointRadius(12,12); | 99 eventSender.setTouchPointRadius(0,12,12); |
| 102 eventSender.updateTouchPoint(0, 50, 50); | 100 eventSender.updateTouchPoint(0, 50, 50); |
| 103 eventSender.setTouchModifier("shift", true); | 101 eventSender.setTouchModifier("shift", true); |
| 104 eventSender.setTouchModifier("alt", true); | 102 eventSender.setTouchModifier("alt", true); |
| 105 eventSender.touchMove(); | 103 eventSender.touchMove(); |
| 106 | 104 |
| 107 eventSender.setTouchModifier("shift", false); | 105 eventSender.setTouchModifier("shift", false); |
| 108 eventSender.setTouchModifier("alt", false); | 106 eventSender.setTouchModifier("alt", false); |
| 109 | 107 |
| 110 eventSender.releaseTouchPoint(0); | 108 eventSender.releaseTouchPoint(0); |
| 111 eventSender.touchEnd(); | 109 eventSender.touchEnd(); |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 132 | 130 |
| 133 lastEvent = null; | 131 lastEvent = null; |
| 134 eventSender.clearTouchPoints(); | 132 eventSender.clearTouchPoints(); |
| 135 touchTargets(); | 133 touchTargets(); |
| 136 | 134 |
| 137 } else { | 135 } else { |
| 138 debug("This test requires DumpRenderTree. Tap on the blue rect to log.") | 136 debug("This test requires DumpRenderTree. Tap on the blue rect to log.") |
| 139 } | 137 } |
| 140 | 138 |
| 141 | 139 |
| OLD | NEW |