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

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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/pointer-use-count-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 var PointerEventAttributeCount = 1320; //Comes from enum Feature in UseCounter.h
27
28 function init() {
29 var targetDiv = document.getElementById("grey");
30 targetDiv.addEventListener("pointerdown", 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 shouldBe('true', 'internals.isUseCounted(document, PointerEventAttributeCount) ');
bokan 2016/04/21 20:18:16 nit: sorry, I misled you, the value being tested s
sahel 2016/04/21 20:57:14 No worries, fixed it.
43 }
44
45 init();
46 if (window.eventSender)
47 runTest();
48 else
49 debug("This test requires eventSender");
50
51 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/pointer-use-count-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698