| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE HTML> | |
| 2 <title>GlobalEventHandlers Touch Interface Tests</title> | |
| 3 <script src="../../../resources/testharness.js"></script> | |
| 4 <script src="../../../resources/testharnessreport.js"></script> | |
| 5 <script> | |
| 6 test(function() { | |
| 7 var touch_event_list = ['ontouchstart', 'ontouchmove', 'ontouchend', 'ontouc
hcancel']; | |
| 8 var global_event_handlers = [window, HTMLElement.prototype, SVGElement.proto
type, Document.prototype]; | |
| 9 for (var i in touch_event_list) { | |
| 10 for (var j in global_event_handlers) { | |
| 11 assert_true(touch_event_list[i] in global_event_handlers[j], "Touch
event " + touch_event_list[i] + " in " + global_event_handlers[j].constructor.na
me); | |
| 12 } | |
| 13 } | |
| 14 }, "Touch events in GlobalEventHandlers"); | |
| 15 | |
| 16 test(function() { | |
| 17 var touch_event_list = ['ontouchstart', 'ontouchmove', 'ontouchend', 'ontouc
hcancel']; | |
| 18 var global_event_handlers = [window, HTMLElement.prototype, SVGElement.proto
type, Document.prototype]; | |
| 19 for (var i in touch_event_list) { | |
| 20 for (var j in global_event_handlers) { | |
| 21 assert_true(global_event_handlers[j].hasOwnProperty(touch_event_list
[i]), "GlobalEventHandler " + global_event_handlers[j].constructor.name + " hasO
wnProperty " + touch_event_list[i]); | |
| 22 } | |
| 23 } | |
| 24 }, "Touch events are GlobalEventHandlers' own property"); | |
| 25 | |
| 26 test(function() { | |
| 27 var touch_event_list = ['ontouchstart', 'ontouchmove', 'ontouchend', 'ontouc
hcancel']; | |
| 28 var non_global_event_handlers = [Element.prototype]; | |
| 29 for (var i in touch_event_list) { | |
| 30 for (var j in non_global_event_handlers) { | |
| 31 assert_false(touch_event_list[i] in non_global_event_handlers[j], "T
ouch event " + touch_event_list[i] + " not in " + non_global_event_handlers[j].c
onstructor.name); | |
| 32 } | |
| 33 } | |
| 34 }, "Touch events not in Element.prototype"); | |
| 35 </script> | |
| OLD | NEW |