Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/touch-events/touch-globaleventhandler-interface.html

Issue 1985353002: Move the touch-events directory from web-platform-tests/ to wpt/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698