| 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 eventSender.addTouchPoint(10, 10); |
| 95 if (eventSender.setTouchPointRadius) | 96 if (eventSender.setTouchPointRadius) |
| 96 eventSender.setTouchPointRadius(10,10); | 97 eventSender.setTouchPointRadius(0, 10, 10, false); |
| 97 eventSender.addTouchPoint(10, 10); | |
| 98 eventSender.touchStart(); | 98 eventSender.touchStart(); |
| 99 | 99 |
| 100 if (eventSender.setTouchPointRadius) | 100 if (eventSender.setTouchPointRadius) |
| 101 eventSender.setTouchPointRadius(12,12); | 101 eventSender.setTouchPointRadius(0, 12, 12, true); |
| 102 eventSender.updateTouchPoint(0, 50, 50); | 102 eventSender.updateTouchPoint(0, 50, 50); |
| 103 eventSender.setTouchModifier("shift", true); | 103 eventSender.setTouchModifier("shift", true); |
| 104 eventSender.setTouchModifier("alt", true); | 104 eventSender.setTouchModifier("alt", true); |
| 105 eventSender.touchMove(); | 105 eventSender.touchMove(); |
| 106 | 106 |
| 107 eventSender.setTouchModifier("shift", false); | 107 eventSender.setTouchModifier("shift", false); |
| 108 eventSender.setTouchModifier("alt", false); | 108 eventSender.setTouchModifier("alt", false); |
| 109 | 109 |
| 110 eventSender.releaseTouchPoint(0); | 110 eventSender.releaseTouchPoint(0); |
| 111 eventSender.touchEnd(); | 111 eventSender.touchEnd(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 132 | 132 |
| 133 lastEvent = null; | 133 lastEvent = null; |
| 134 eventSender.clearTouchPoints(); | 134 eventSender.clearTouchPoints(); |
| 135 touchTargets(); | 135 touchTargets(); |
| 136 | 136 |
| 137 } else { | 137 } else { |
| 138 debug("This test requires DumpRenderTree. Tap on the blue rect to log.") | 138 debug("This test requires DumpRenderTree. Tap on the blue rect to log.") |
| 139 } | 139 } |
| 140 | 140 |
| 141 | 141 |
| OLD | NEW |