1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
2 <script src=
"../../../resources/js-test.js"></script>
3 <script type=
"text/javascript">
4 description('Test that touch events should have a sourceCapabilities and its firesTouchEvents should be true.');
6 function touchHandler() {
7 shouldBeNonNull("event.sourceCapabilities");
8 shouldBeTrue("event.sourceCapabilities.firesTouchEvents");
11 if (window
.eventSender
) {
12 document
.addEventListener("touchstart", touchHandler
, false);
13 document
.addEventListener("touchmove", touchHandler
, false);
14 document
.addEventListener("touchend", touchHandler
, false);
15 document
.addEventListener("touchcancel", touchHandler
, false);
17 debug('Sending touchstart');
18 eventSender
.addTouchPoint(15, 15);
19 eventSender
.touchStart();
21 eventSender
.updateTouchPoint(0, 55, 55);
22 debug('Sending touchmove');
23 eventSender
.touchMove();
25 debug('Sending touchend');
26 eventSender
.releaseTouchPoint(0);
27 eventSender
.touchEnd();
29 debug('Sending touchstart');
30 eventSender
.addTouchPoint(35, 35);
31 eventSender
.touchStart();
33 debug('Sending touchcancel');
34 eventSender
.cancelTouchPoint(0);
35 eventSender
.touchCancel();
37 debug('This test requires eventSender.');