- From: <Cathy.Chan@nokia.com>
- Date: Mon, 26 Nov 2012 21:12:29 +0000
- To: <public-webevents@w3.org>
- Message-ID: <A46437648ECB3D4F852B077AFF9099F51C8D0043@008-AM1MPN1-063.mgdnok.nokia.com>
Hi all, Here's my attempt at some multi-touch test cases. The tests can be found at http://w3c-test.org/webevents/tests/touch-events-v1/submissions/Nokia. I took a different approach than what we did with the single-touch case by having several test files targeted at different aspects. You can find the following test files at the above location. create-touch-touchlist.html - tests the createTouch and createTouchList APIs. (This actually extends but also overlaps some of the test cases in the single-touch test file. We might consider removing the overlapping cases from the single-touch file.) multi-touch-interfaces.html - tests the implementation of various interfaces (Touch, TouchList and the various events) multi-touch-interactions.html - tests the relationship between Touch events received over time (e.g. how the touch lists in a touch event relates to those received before it etc). Although I included a specific touch pattern in this test, the test actually works for any touch pattern. I've run the tests on a few browsers/devices (the useful ones being Chrome/Firefox/Opera on Android and Mobile Safari on iPad). Most of the failures are related to issues already exposed by the single-touch test: - identifiedTouch is missing from WebKit implementations (Mobile Safari, Chrome on Android). - WebKit implementations (Mobile Safari on iPad, Chrome on Android)of createTouchList does not support an array as input parameter (https://bugs.webkit.org/show_bug.cgi?id=97418). - with Firefox on Android and Safari on iPad, the clientX/Y check fails. A notable multi-touch specific observation: - with Mobile Safari on iPad, with the touch pattern stated in the test file, assertions 1.5.3.4 and 1.5.4.2 sometimes fail. It appears that when multiple fingers are lifted simultaneously, the UA sometimes dispatches the "same" touchend event to the different targets, where touches is the same but changedTouches and targetTouches vary according to the target element. In particular, changedTouches contains only those touches that were removed from the touch surface, and originated from the target element. This contradicts the definition in the spec that "For the touchend and touchcancel events this must be a list of the touch points that have just been removed from the surface.", which to me reads "regardless of where they started". When these "same" touchend events are processed one after another, the behavior becomes different than the expected behavior. To see this in action, uncomment the commented statement in debug_print() at the top of multi-touch-interactions.js. (It would probably take several attempts to see a failure. It all depends on the timing of removing the fingers and possibly also internal timing on the device itself.) [I also tried these tests on Firefox on N9, the stock WebKit browser on N9 and Opera on Symbian, but encountered rather surprising behaviors such as not able to get multi-touch to work at all on Firefox/N9, and not more than two touches on Opera/Symbian. Seeing that these vendors probably are no longer actively developing for these platforms, I assume there's little point in pursuing the issues.] On a per browser/engine basis, the results look like this. - Opera on Android passes all tests. - Firefox on Android fails only on the clientX/Y check. - WebKit (Chrome and Mobile Safari) has issues with identifiedTouch and createTouchList with arrays. - Additionally Mobile Safari has issues with the clientX/Y check, as well as when multiple touch points that originate on different elements are removed from the touch surface simultaneously. To have at least two passing implementations, we would need either the clientX/Y assertions fixed in the test (I remember Rick said it could have been an issue with the test itself and not the browsers), or the identifiedTouch and createTouchList issues fixed in WebKit. Comments, flames, suggestions are welcome. Regards, Cathy.
Attachments
- application/pkcs7-signature attachment: smime.p7s
Received on Monday, 26 November 2012 21:13:01 UTC