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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_support.js

Issue 2303013002: Add UMA metric to track usage of sending a mousedown to select elements. (Closed)
Patch Set: W3C auto test import CL. Created 4 years, 3 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
1 var All_Pointer_Events = [ 1 var All_Pointer_Events = [
2 "pointerdown", 2 "pointerdown",
3 "pointerup", 3 "pointerup",
4 "pointercancel", 4 "pointercancel",
5 "pointermove", 5 "pointermove",
6 "pointerover", 6 "pointerover",
7 "pointerout", 7 "pointerout",
8 "pointerenter", 8 "pointerenter",
9 "pointerleave", 9 "pointerleave",
10 "gotpointercapture", 10 "gotpointercapture",
11 "lostpointercapture"]; 11 "lostpointercapture"];
12 12
13 // Check for conformance to PointerEvent interface 13 // Check for conformance to PointerEvent interface
14 // TA: 1.1, 1.2, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13 14 // TA: 1.1, 1.2, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13
15 function check_PointerEvent(event) { 15 function check_PointerEvent(event, testNamePrefix) {
16 var pointerTestName = event.pointerType + ' ' + event.type; 16 if (testNamePrefix === undefined)
17 testNamePrefix = "";
18 var pointerTestName = testNamePrefix + ' ' + event.pointerType + ' ' + event .type;
17 test(function () { 19 test(function () {
18 assert_true(event instanceof PointerEvent, "event is a PointerEvent even t"); 20 assert_true(event instanceof event.target.ownerDocument.defaultView.Poin terEvent, "event is a PointerEvent event");
19 }, pointerTestName + " event is a PointerEvent event"); 21 }, pointerTestName + " event is a PointerEvent event");
20 22
21 23
22 // Check attributes for conformance to WebIDL: 24 // Check attributes for conformance to WebIDL:
23 // * attribute exists 25 // * attribute exists
24 // * has proper type 26 // * has proper type
25 // * if the attribute is "readonly", it cannot be changed 27 // * if the attribute is "readonly", it cannot be changed
26 // TA: 1.1, 1.2 28 // TA: 1.1, 1.2
27 var idl_type_check = { 29 var idl_type_check = {
28 "long": function (v) { return typeof v === "number" && Math.round(v) === v; }, 30 "long": function (v) { return typeof v === "number" && Math.round(v) === v; },
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 178 }
177 179
178 function rPointerCapture(e) { 180 function rPointerCapture(e) {
179 try { 181 try {
180 captureButton.value = 'Set Capture'; 182 captureButton.value = 'Set Capture';
181 target0.releasePointerCapture(e.pointerId); 183 target0.releasePointerCapture(e.pointerId);
182 } 184 }
183 catch(e) { 185 catch(e) {
184 } 186 }
185 } 187 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698