Changeset 54817 in webkit
- Timestamp:
- Feb 16, 2010 3:18:30 AM (14 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 edited
- 3 copied
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r54807 r54817 1 2010-02-16 Ben Murdoch <benm@google.com> 2 3 Reviewed by Simon Hausmann. 4 5 Refactor and split up basic-touch-events test 6 https://bugs.webkit.org/show_bug.cgi?id=34476 7 8 Split the basic-touch-events test into two separate tests, one for single and another for multi touch. Also refactor the tests to run in an asynchronous manner. 9 10 * fast/events/touch/basic-multi-touch-events.html: Copied from LayoutTests/fast/events/touch/basic-touch-events.html. Tests the same multi touch tests cases from the old basic-touch-events test. 11 * fast/events/touch/basic-multi-touch-events-expected.txt: Added. 12 * fast/events/touch/script-tests/basic-multi-touch-events.js: Added. 13 * fast/events/touch/basic-single-touch-events.html: Copied from LayoutTests/fast/events/touch/basic-touch-events.html. Tests the same single touch tests cases from the old basic-touch-events test. 14 * fast/events/touch/script-tests/basic-single-touch-events.js: Added. 15 * fast/events/touch/basic-single-touch-events-expected.txt: Added. 16 * fast/events/touch/basic-touch-events.html: Removed. 17 * fast/events/touch/script-tests/basic-touch-events.js: Removed. 18 * fast/events/touch/basic-touch-events-expected.txt: Removed. 19 1 20 2010-02-15 Dan Bernstein <mitz@apple.com> 2 21 -
trunk/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/LayoutTests/fast/events/touch/basic-touch-events-expected.txt 53455
r54814 r54817 1 This tests basic touch event support. 2 single touch sequence 3 PASS lastEvent.type is "touchstart" 4 PASS lastEvent.touches.length is 1 5 PASS lastEvent.changedTouches.length is 1 6 PASS lastEvent.targetTouches.length is 1 7 PASS lastEvent.shiftKey is false 8 PASS lastEvent.touches[0].target.id is "touchtarget" 9 PASS lastEvent.touches[0].pageX is 10 10 PASS lastEvent.touches[0].pageY is 10 11 PASS lastEvent.touches[0].clientX is 10 12 PASS lastEvent.touches[0].clientY is 10 13 PASS lastEvent.touches[0].identifier is 0 14 PASS lastEvent.changedTouches[0].pageX is 10 15 PASS lastEvent.changedTouches[0].pageY is 10 16 PASS lastEvent.changedTouches[0].clientX is 10 17 PASS lastEvent.changedTouches[0].clientY is 10 18 PASS lastEvent.changedTouches[0].identifier is 0 19 PASS lastEvent.targetTouches[0].pageX is 10 20 PASS lastEvent.targetTouches[0].pageY is 10 21 PASS lastEvent.targetTouches[0].clientX is 10 22 PASS lastEvent.targetTouches[0].clientY is 10 23 PASS lastEvent.targetTouches[0].identifier is 0 24 PASS lastEvent.type is "touchmove" 25 PASS lastEvent.touches.length is 1 26 PASS lastEvent.changedTouches.length is 1 27 PASS lastEvent.targetTouches.length is 1 28 PASS lastEvent.touches[0].pageX is 20 29 PASS lastEvent.touches[0].pageY is 15 30 PASS lastEvent.touches[0].clientX is 20 31 PASS lastEvent.touches[0].clientY is 15 32 PASS lastEvent.touches[0].identifier is 0 33 PASS lastEvent.shiftKey is true 34 PASS lastEvent.altKey is true 35 PASS lastEvent.ctrlKey is false 36 PASS lastEvent.metaKey is false 37 PASS lastEvent.type is "touchend" 38 PASS lastEvent.touches.length is 0 39 PASS lastEvent.changedTouches.length is 1 40 PASS lastEvent.targetTouches.length is 0 41 PASS lastEvent.changedTouches[0].pageX is 20 42 PASS lastEvent.changedTouches[0].pageY is 15 43 PASS lastEvent.changedTouches[0].clientX is 20 44 PASS lastEvent.changedTouches[0].clientY is 15 45 PASS lastEvent.changedTouches[0].identifier is 0 46 PASS lastEvent.shiftKey is false 47 PASS lastEvent.altKey is false 1 This tests basic multi touch event support. 2 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 48 6 multi touch sequence 49 7 Two touchpoints pressed … … 132 90 PASS lastEvent.changedTouches[0].clientY is 30 133 91 PASS lastEvent.changedTouches[0].identifier is 1 134 verify touch targets135 PASS lastEvent.type is "touchstart"136 PASS lastEvent.touches.length is 1137 PASS lastEvent.changedTouches.length is 1138 PASS lastEvent.targetTouches.length is 1139 PASS lastEvent.targetTouches[0].target.tagName is "DIV"140 PASS lastEvent.type is "touchmove"141 PASS lastEvent.touches.length is 1142 PASS lastEvent.changedTouches.length is 1143 PASS lastEvent.targetTouches.length is 0144 PASS lastEvent.touches[0].target.tagName is "HTML"145 92 PASS successfullyParsed is true 146 93 -
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
trunk/LayoutTests/fast/events/touch/basic-multi-touch-events.html
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/LayoutTests/fast/events/touch/basic-touch-events.html 53455
r54814 r54817 4 4 <link rel="stylesheet" href="../../js/resources/js-test-style.css"> 5 5 <script src="../../js/resources/js-test-pre.js"></script> 6 <script src="../../js/resources/js-test-post-function.js"></script> 6 7 </head> 7 8 <body> 8 9 <p id="description"></p> 9 10 <div id="console"></div> 10 <script src="script-tests/basic- touch-events.js"></script>11 <script src="../../js/resources/js-test-post.js"></script> 11 <script src="script-tests/basic-multi-touch-events.js"></script> 12 12 13 </body> 13 14 </html> -
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
trunk/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/LayoutTests/fast/events/touch/basic-touch-events-expected.txt 53455
r54814 r54817 1 This tests basic touch event support. 2 single touch sequence 1 This tests basic single touch event support. 2 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 3 6 PASS lastEvent.type is "touchstart" 4 7 PASS lastEvent.touches.length is 1 … … 46 49 PASS lastEvent.shiftKey is false 47 50 PASS lastEvent.altKey is false 48 multi touch sequence49 Two touchpoints pressed50 PASS lastEvent.type is "touchstart"51 PASS lastEvent.touches.length is 252 PASS lastEvent.changedTouches.length is 253 PASS lastEvent.targetTouches.length is 254 PASS lastEvent.touches[0].pageX is 1055 PASS lastEvent.touches[0].pageY is 1056 PASS lastEvent.touches[0].clientX is 1057 PASS lastEvent.touches[0].clientY is 1058 PASS lastEvent.touches[0].identifier is 059 PASS lastEvent.touches[1].pageX is 2060 PASS lastEvent.touches[1].pageY is 3061 PASS lastEvent.touches[1].clientX is 2062 PASS lastEvent.touches[1].clientY is 3063 PASS lastEvent.touches[1].identifier is 164 PASS lastEvent.changedTouches[0].pageX is 1065 PASS lastEvent.changedTouches[0].pageY is 1066 PASS lastEvent.changedTouches[0].clientX is 1067 PASS lastEvent.changedTouches[0].clientY is 1068 PASS lastEvent.changedTouches[0].identifier is 069 PASS lastEvent.changedTouches[1].pageX is 2070 PASS lastEvent.changedTouches[1].pageY is 3071 PASS lastEvent.changedTouches[1].clientX is 2072 PASS lastEvent.changedTouches[1].clientY is 3073 PASS lastEvent.changedTouches[1].identifier is 174 PASS lastEvent.targetTouches[0].pageX is 1075 PASS lastEvent.targetTouches[0].pageY is 1076 PASS lastEvent.targetTouches[0].clientX is 1077 PASS lastEvent.targetTouches[0].clientY is 1078 PASS lastEvent.targetTouches[0].identifier is 079 PASS lastEvent.targetTouches[1].pageX is 2080 PASS lastEvent.targetTouches[1].pageY is 3081 PASS lastEvent.targetTouches[1].clientX is 2082 PASS lastEvent.targetTouches[1].clientY is 3083 PASS lastEvent.targetTouches[1].identifier is 184 First touchpoint moved85 PASS lastEvent.type is "touchmove"86 PASS lastEvent.touches.length is 287 PASS lastEvent.changedTouches.length is 188 PASS lastEvent.targetTouches.length is 289 PASS lastEvent.touches[0].pageX is 1590 PASS lastEvent.touches[0].pageY is 1591 PASS lastEvent.touches[0].clientX is 1592 PASS lastEvent.touches[0].clientY is 1593 PASS lastEvent.touches[0].identifier is 094 PASS lastEvent.changedTouches[0].pageX is 1595 PASS lastEvent.changedTouches[0].pageY is 1596 PASS lastEvent.changedTouches[0].clientX is 1597 PASS lastEvent.changedTouches[0].clientY is 1598 PASS lastEvent.changedTouches[0].identifier is 099 PASS lastEvent.touches[1].pageX is 20100 PASS lastEvent.touches[1].pageY is 30101 PASS lastEvent.touches[1].clientX is 20102 PASS lastEvent.touches[1].clientY is 30103 PASS lastEvent.touches[1].identifier is 1104 First touchpoint is released105 PASS lastEvent.type is "touchend"106 PASS lastEvent.touches.length is 1107 PASS lastEvent.changedTouches.length is 1108 PASS lastEvent.targetTouches.length is 1109 PASS lastEvent.touches[0].pageX is 20110 PASS lastEvent.touches[0].pageY is 30111 PASS lastEvent.touches[0].clientX is 20112 PASS lastEvent.touches[0].clientY is 30113 PASS lastEvent.touches[0].identifier is 1114 PASS lastEvent.changedTouches[0].pageX is 15115 PASS lastEvent.changedTouches[0].pageY is 15116 PASS lastEvent.changedTouches[0].clientX is 15117 PASS lastEvent.changedTouches[0].clientY is 15118 PASS lastEvent.changedTouches[0].identifier is 0119 PASS lastEvent.targetTouches[0].pageX is 20120 PASS lastEvent.targetTouches[0].pageY is 30121 PASS lastEvent.targetTouches[0].clientX is 20122 PASS lastEvent.targetTouches[0].clientY is 30123 PASS lastEvent.targetTouches[0].identifier is 1124 Last remaining touchpoint is released125 PASS lastEvent.type is "touchend"126 PASS lastEvent.touches.length is 0127 PASS lastEvent.changedTouches.length is 1128 PASS lastEvent.targetTouches.length is 0129 PASS lastEvent.changedTouches[0].pageX is 20130 PASS lastEvent.changedTouches[0].pageY is 30131 PASS lastEvent.changedTouches[0].clientX is 20132 PASS lastEvent.changedTouches[0].clientY is 30133 PASS lastEvent.changedTouches[0].identifier is 1134 verify touch targets135 51 PASS lastEvent.type is "touchstart" 136 52 PASS lastEvent.touches.length is 1 -
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
trunk/LayoutTests/fast/events/touch/basic-single-touch-events.html
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/LayoutTests/fast/events/touch/basic-touch-events.html 53455
r54814 r54817 4 4 <link rel="stylesheet" href="../../js/resources/js-test-style.css"> 5 5 <script src="../../js/resources/js-test-pre.js"></script> 6 <script src="../../js/resources/js-test-post-function.js"></script> 6 7 </head> 7 8 <body> 8 9 <p id="description"></p> 9 10 <div id="console"></div> 10 <script src="script-tests/basic-touch-events.js"></script> 11 <script src="../../js/resources/js-test-post.js"></script> 11 <script src="script-tests/basic-single-touch-events.js"></script> 12 12 </body> 13 13 </html> -
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
trunk/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/LayoutTests/fast/events/touch/script-tests/basic-touch-events.js 53455
r54814 r54817 1 description = "This tests basic touch event support.";2 3 1 var div = document.createElement("div"); 4 2 div.id = "touchtarget"; … … 8 6 9 7 var lastEvent = null; 8 var touchEventsReceived = 0; 9 var EXPECTED_TOUCH_EVENTS_TOTAL = 4; 10 10 11 function appendEventLog() {11 function touchEventCallback() { 12 12 if (window.eventSender) { 13 13 lastEvent = event; 14 verifyTouch(touchEventsReceived++); 14 15 } else { 15 16 debug(event.type); 16 17 } 18 19 if (window.layoutTestController && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL) { 20 // If we've got here, we can safely say we were successfully parsed :) We need to 21 // call the isSucccessfullyParsed function to output the correct TEST COMPLETE 22 // footer message. 23 successfullyParsed = true; 24 isSuccessfullyParsed(); 25 layoutTestController.notifyDone(); 26 } 17 27 } 18 28 19 div.addEventListener("touchstart", appendEventLog, false);20 div.addEventListener("touchmove", appendEventLog, false);21 div.addEventListener("touchend", appendEventLog, false);29 div.addEventListener("touchstart", touchEventCallback, false); 30 div.addEventListener("touchmove", touchEventCallback, false); 31 div.addEventListener("touchend", touchEventCallback, false); 22 32 document.body.insertBefore(div, document.body.firstChild); 23 33 … … 39 49 } 40 50 41 function singleTouchSequence() 42 { 43 debug("single touch sequence"); 51 function verifyTouch(which) { 52 switch (which) { 53 case 0: 54 verifyTouchEvent("touchstart", 2, 2, 2); 55 verifyTouchPoint("touches", 0, 10, 10, 0); 56 verifyTouchPoint("touches", 1, 20, 30, 1); 57 verifyTouchPoint("changedTouches", 0, 10, 10, 0); 58 verifyTouchPoint("changedTouches", 1, 20, 30, 1); 59 verifyTouchPoint("targetTouches", 0, 10, 10, 0); 60 verifyTouchPoint("targetTouches", 1, 20, 30, 1); 61 break; 62 case 1: 63 verifyTouchEvent("touchmove", 2, 1, 2); 64 verifyTouchPoint("touches", 0, 15, 15, 0); 65 verifyTouchPoint("changedTouches", 0, 15, 15, 0); 66 verifyTouchPoint("touches", 1, 20, 30, 1); 67 break; 68 case 2: 69 verifyTouchEvent("touchend", 1, 1, 1); 70 verifyTouchPoint("touches", 0, 20, 30, 1); 71 verifyTouchPoint("changedTouches", 0, 15, 15, 0); 72 verifyTouchPoint("targetTouches", 0, 20, 30, 1); 73 break; 74 case 3: 75 verifyTouchEvent("touchend", 0, 1, 0); 76 verifyTouchPoint("changedTouches", 0, 20, 30, 1); 77 break; 44 78 45 eventSender.addTouchPoint(10, 10); 46 eventSender.touchStart(); 47 48 verifyTouchEvent("touchstart", 1, 1, 1); 49 shouldBe("lastEvent.shiftKey", "false"); 50 shouldBeEqualToString("lastEvent.touches[0].target.id", "touchtarget"); 51 verifyTouchPoint("touches", 0, 10, 10, 0); 52 verifyTouchPoint("changedTouches", 0, 10, 10, 0); 53 verifyTouchPoint("targetTouches", 0, 10, 10, 0); 54 55 eventSender.updateTouchPoint(0, 20, 15); 56 eventSender.setTouchModifier("shift", true); 57 eventSender.setTouchModifier("alt", true); 58 eventSender.touchMove(); 59 60 verifyTouchEvent("touchmove", 1, 1, 1); 61 verifyTouchPoint("touches", 0, 20, 15, 0); 62 shouldBe("lastEvent.shiftKey", "true"); 63 shouldBe("lastEvent.altKey", "true"); 64 shouldBe("lastEvent.ctrlKey", "false"); 65 shouldBe("lastEvent.metaKey", "false"); 66 67 eventSender.setTouchModifier("shift", false); 68 eventSender.setTouchModifier("alt", false); 69 70 eventSender.releaseTouchPoint(0); 71 eventSender.touchEnd(); 72 73 verifyTouchEvent("touchend", 0, 1, 0); 74 verifyTouchPoint("changedTouches", 0, 20, 15, 0); 75 shouldBe("lastEvent.shiftKey", "false"); 76 shouldBe("lastEvent.altKey", "false"); 79 default: testFailed("Wrong number of touch events! (" + which + ")"); 80 } 77 81 } 78 82 … … 85 89 eventSender.addTouchPoint(20, 30); 86 90 eventSender.touchStart(); 87 verifyTouchEvent("touchstart", 2, 2, 2);88 verifyTouchPoint("touches", 0, 10, 10, 0);89 verifyTouchPoint("touches", 1, 20, 30, 1);90 verifyTouchPoint("changedTouches", 0, 10, 10, 0);91 verifyTouchPoint("changedTouches", 1, 20, 30, 1);92 verifyTouchPoint("targetTouches", 0, 10, 10, 0);93 verifyTouchPoint("targetTouches", 1, 20, 30, 1);94 91 95 92 debug("First touchpoint moved"); 96 93 eventSender.updateTouchPoint(0, 15, 15); 97 94 eventSender.touchMove(); 98 verifyTouchEvent("touchmove", 2, 1, 2);99 verifyTouchPoint("touches", 0, 15, 15, 0);100 verifyTouchPoint("changedTouches", 0, 15, 15, 0);101 verifyTouchPoint("touches", 1, 20, 30, 1);102 95 103 96 debug("First touchpoint is released"); 104 97 eventSender.releaseTouchPoint(0); 105 98 eventSender.touchEnd(); 106 verifyTouchEvent("touchend", 1, 1, 1);107 verifyTouchPoint("touches", 0, 20, 30, 1);108 verifyTouchPoint("changedTouches", 0, 15, 15, 0);109 verifyTouchPoint("targetTouches", 0, 20, 30, 1);110 99 111 100 debug("Last remaining touchpoint is released"); 112 101 eventSender.releaseTouchPoint(0); 113 102 eventSender.touchEnd(); 114 verifyTouchEvent("touchend", 0, 1, 0);115 verifyTouchPoint("changedTouches", 0, 20, 30, 1);116 }117 118 function touchTargets()119 {120 debug("verify touch targets");121 122 eventSender.addTouchPoint(10, 10);123 eventSender.touchStart();124 125 verifyTouchEvent("touchstart", 1, 1, 1);126 shouldBeEqualToString("lastEvent.targetTouches[0].target.tagName", "DIV");127 128 eventSender.updateTouchPoint(0, 1000, 1000);129 eventSender.touchMove();130 131 verifyTouchEvent("touchmove", 1, 1, 0);132 shouldBeEqualToString("lastEvent.touches[0].target.tagName", "HTML");133 103 } 134 104 135 105 if (window.eventSender) { 136 debug(description); 137 138 lastEvent = null; 139 eventSender.clearTouchPoints(); 140 singleTouchSequence(); 106 description("This tests basic multi touch event support."); 141 107 142 108 lastEvent = null; 143 109 eventSender.clearTouchPoints(); 144 110 multiTouchSequence(); 145 146 lastEvent = null;147 eventSender.clearTouchPoints();148 touchTargets();149 150 111 } else { 151 112 debug("This test requires DumpRenderTree. Tap on the blue rect to log.") -
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
trunk/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/LayoutTests/fast/events/touch/script-tests/basic-touch-events.js 53455
r54814 r54817 1 description = "This tests basic touch event support.";2 3 1 var div = document.createElement("div"); 4 2 div.id = "touchtarget"; … … 8 6 9 7 var lastEvent = null; 8 var touchEventsReceived = 0; 9 var EXPECTED_TOUCH_EVENTS_TOTAL = 5; 10 10 11 function appendEventLog() {11 function touchEventCallback() { 12 12 if (window.eventSender) { 13 13 lastEvent = event; 14 verifyTouch(touchEventsReceived++); 14 15 } else { 15 16 debug(event.type); 16 17 } 18 19 if (window.layoutTestController && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL) { 20 // If we've got here, we can safely say we were successfully parsed :) We need to 21 // call the isSucccessfullyParsed function to output the correct TEST COMPLETE 22 // footer message. 23 successfullyParsed = true; 24 isSuccessfullyParsed(); 25 layoutTestController.notifyDone(); 26 } 17 27 } 18 28 19 div.addEventListener("touchstart", appendEventLog, false);20 div.addEventListener("touchmove", appendEventLog, false);21 div.addEventListener("touchend", appendEventLog, false);29 div.addEventListener("touchstart", touchEventCallback, false); 30 div.addEventListener("touchmove", touchEventCallback, false); 31 div.addEventListener("touchend", touchEventCallback, false); 22 32 document.body.insertBefore(div, document.body.firstChild); 23 33 … … 39 49 } 40 50 51 function verifyTouch(which) { 52 switch (which) { 53 case 0: 54 verifyTouchEvent("touchstart", 1, 1, 1); 55 shouldBe("lastEvent.shiftKey", "false"); 56 shouldBeEqualToString("lastEvent.touches[0].target.id", "touchtarget"); 57 verifyTouchPoint("touches", 0, 10, 10, 0); 58 verifyTouchPoint("changedTouches", 0, 10, 10, 0); 59 verifyTouchPoint("targetTouches", 0, 10, 10, 0); 60 break; 61 case 1: 62 verifyTouchEvent("touchmove", 1, 1, 1); 63 verifyTouchPoint("touches", 0, 20, 15, 0); 64 shouldBe("lastEvent.shiftKey", "true"); 65 shouldBe("lastEvent.altKey", "true"); 66 shouldBe("lastEvent.ctrlKey", "false"); 67 shouldBe("lastEvent.metaKey", "false"); 68 break; 69 case 2: 70 verifyTouchEvent("touchend", 0, 1, 0); 71 verifyTouchPoint("changedTouches", 0, 20, 15, 0); 72 shouldBe("lastEvent.shiftKey", "false"); 73 shouldBe("lastEvent.altKey", "false"); 74 break; 75 case 3: 76 verifyTouchEvent("touchstart", 1, 1, 1); 77 shouldBeEqualToString("lastEvent.targetTouches[0].target.tagName", "DIV"); 78 break; 79 case 4: 80 verifyTouchEvent("touchmove", 1, 1, 0); 81 shouldBeEqualToString("lastEvent.touches[0].target.tagName", "HTML"); 82 break; 83 84 default: testFailed("Wrong number of touch events! (" + which + ")"); 85 } 86 } 87 41 88 function singleTouchSequence() 42 89 { 43 debug("single touch sequence");44 45 90 eventSender.addTouchPoint(10, 10); 46 91 eventSender.touchStart(); 47 48 verifyTouchEvent("touchstart", 1, 1, 1);49 shouldBe("lastEvent.shiftKey", "false");50 shouldBeEqualToString("lastEvent.touches[0].target.id", "touchtarget");51 verifyTouchPoint("touches", 0, 10, 10, 0);52 verifyTouchPoint("changedTouches", 0, 10, 10, 0);53 verifyTouchPoint("targetTouches", 0, 10, 10, 0);54 92 55 93 eventSender.updateTouchPoint(0, 20, 15); … … 58 96 eventSender.touchMove(); 59 97 60 verifyTouchEvent("touchmove", 1, 1, 1);61 verifyTouchPoint("touches", 0, 20, 15, 0);62 shouldBe("lastEvent.shiftKey", "true");63 shouldBe("lastEvent.altKey", "true");64 shouldBe("lastEvent.ctrlKey", "false");65 shouldBe("lastEvent.metaKey", "false");66 67 98 eventSender.setTouchModifier("shift", false); 68 99 eventSender.setTouchModifier("alt", false); … … 70 101 eventSender.releaseTouchPoint(0); 71 102 eventSender.touchEnd(); 72 73 verifyTouchEvent("touchend", 0, 1, 0);74 verifyTouchPoint("changedTouches", 0, 20, 15, 0);75 shouldBe("lastEvent.shiftKey", "false");76 shouldBe("lastEvent.altKey", "false");77 }78 79 function multiTouchSequence()80 {81 debug("multi touch sequence");82 83 debug("Two touchpoints pressed");84 eventSender.addTouchPoint(10, 10);85 eventSender.addTouchPoint(20, 30);86 eventSender.touchStart();87 verifyTouchEvent("touchstart", 2, 2, 2);88 verifyTouchPoint("touches", 0, 10, 10, 0);89 verifyTouchPoint("touches", 1, 20, 30, 1);90 verifyTouchPoint("changedTouches", 0, 10, 10, 0);91 verifyTouchPoint("changedTouches", 1, 20, 30, 1);92 verifyTouchPoint("targetTouches", 0, 10, 10, 0);93 verifyTouchPoint("targetTouches", 1, 20, 30, 1);94 95 debug("First touchpoint moved");96 eventSender.updateTouchPoint(0, 15, 15);97 eventSender.touchMove();98 verifyTouchEvent("touchmove", 2, 1, 2);99 verifyTouchPoint("touches", 0, 15, 15, 0);100 verifyTouchPoint("changedTouches", 0, 15, 15, 0);101 verifyTouchPoint("touches", 1, 20, 30, 1);102 103 debug("First touchpoint is released");104 eventSender.releaseTouchPoint(0);105 eventSender.touchEnd();106 verifyTouchEvent("touchend", 1, 1, 1);107 verifyTouchPoint("touches", 0, 20, 30, 1);108 verifyTouchPoint("changedTouches", 0, 15, 15, 0);109 verifyTouchPoint("targetTouches", 0, 20, 30, 1);110 111 debug("Last remaining touchpoint is released");112 eventSender.releaseTouchPoint(0);113 eventSender.touchEnd();114 verifyTouchEvent("touchend", 0, 1, 0);115 verifyTouchPoint("changedTouches", 0, 20, 30, 1);116 103 } 117 104 118 105 function touchTargets() 119 106 { 120 debug("verify touch targets");121 122 107 eventSender.addTouchPoint(10, 10); 123 108 eventSender.touchStart(); 124 109 125 verifyTouchEvent("touchstart", 1, 1, 1);126 shouldBeEqualToString("lastEvent.targetTouches[0].target.tagName", "DIV");127 128 110 eventSender.updateTouchPoint(0, 1000, 1000); 129 111 eventSender.touchMove(); 130 131 verifyTouchEvent("touchmove", 1, 1, 0);132 shouldBeEqualToString("lastEvent.touches[0].target.tagName", "HTML");133 112 } 134 113 114 if (window.layoutTestController) 115 layoutTestController.waitUntilDone(); 116 135 117 if (window.eventSender) { 136 de bug(description);118 description("This tests basic single touch event support."); 137 119 138 120 lastEvent = null; 139 121 eventSender.clearTouchPoints(); 140 122 singleTouchSequence(); 141 142 lastEvent = null;143 eventSender.clearTouchPoints();144 multiTouchSequence();145 123 146 124 lastEvent = null; … … 152 130 } 153 131 154 var successfullyParsed = true; 132 -
Property
svn:mergeinfo
set to
(toggle deleted branches)
Note: See TracChangeset
for help on using the changeset viewer.