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

Side by Side Diff: third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/pointer-use-count.html

Issue 1895983002: Adding UMA metrics to track usage of pointerevents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 <script src="../../../../../resources/js-test.js"></script>
3 <style>
4 div.box {
5 margin: 5px;
6 padding: 20px;
7 float: left;
8 width: 50px;
9 height: 50px;
10 }
11 </style>
12
13 <div id="grey" class="box" style="background-color:grey">
14 </div>
15
16 <div id="console"></div>
17
18 <script>
19 description("Verifies that use of pointerEvents is measured by use counters.");
20
21
22 var rect = document.getElementById("grey").getBoundingClientRect();
23 var x1 = rect.left + 5;
24 var y1 = rect.top + 5;
25
26
27 function init() {
28 var eventName = "pointerdown";
29 var targetDiv = document.getElementById("grey");
30 targetDiv.addEventListener(eventName, function(event) {
31 debug("grey" + " received " + event.type);
32 debug(" **** read pointerID to trigger MeasureAs ***** ");
33 debug("pointerID is "+ event.pointerId);
34 });
35 }
36
37 function runTest() {
38 debug(" **** Move to grey box & mouse press ***** ");
39 eventSender.mouseMoveTo(x1, y1);
40 eventSender.mouseDown(1);
41
42 var PointerEventAttributeCount = 1306; //Comes from enum Feature in UseCounter .h
tdresser 2016/04/21 12:15:59 This didn't get updated.
sahel 2016/04/21 20:11:19 Done.
43 debug(" **** Print PointerEventCount usage ***** ");
44 debug(internals.isUseCounted(document, PointerEventAttributeCount));
bokan 2016/04/21 13:12:11 It's more idiomatic to check your assertions using
sahel 2016/04/21 20:11:19 Done.
45 }
46
47 init();
48 if (window.eventSender)
49 runTest();
50 else
51 debug("This test requires eventSender");
52
53 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698