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

Side by Side Diff: LayoutTests/inspector/user-metrics.html

Issue 1061503002: DevTools: use recordEnumeratedHistogram instead of recordActionTaken (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix inspector/user-metrics.html Created 5 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 | Source/devtools/front_end/devtools_app/InspectorFrontendHostImpl.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script> 3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script src="../http/tests/inspector/timeline-test.js"></script> 4 <script src="../http/tests/inspector/timeline-test.js"></script>
5 <script src="profiler/profiler-test.js"></script> 5 <script src="profiler/profiler-test.js"></script>
6 <script src="audits/audits-test.js"></script> 6 <script src="audits/audits-test.js"></script>
7 <script> 7 <script>
8 8
9 function test() 9 function test()
10 { 10 {
11 InspectorFrontendHost.recordActionTaken = function(actionCode) 11 InspectorFrontendHost.recordEnumeratedHistogram = function(name, code)
12 { 12 {
13 InspectorTest.addResult("Action taken: " + nameOf(WebInspector.UserMetri cs._ActionCodes, actionCode)); 13 if (name === "DevTools.ActionTaken")
14 } 14 InspectorTest.addResult("Action taken: " + nameOf(WebInspector.UserM etrics._ActionCodes, code));
15 15 else if (name === "DevTools.PanelShown")
16 InspectorFrontendHost.recordPanelShown = function(panelCode) 16 InspectorTest.addResult("Panel shown: " + nameOf(WebInspector.UserMe trics._PanelCodes, code));
17 {
18 InspectorTest.addResult("Panel shown: " + nameOf(WebInspector.UserMetric s._PanelCodes, panelCode));
19 } 17 }
20 18
21 function nameOf(object, code) 19 function nameOf(object, code)
22 { 20 {
23 for (var name in object) { 21 for (var name in object) {
24 if (object[name] === code) 22 if (object[name] === code)
25 return name; 23 return name;
26 } 24 }
27 return null; 25 return null;
28 } 26 }
(...skipping 13 matching lines...) Expand all
42 } 40 }
43 41
44 </script> 42 </script>
45 </head> 43 </head>
46 44
47 <body onload="runTest()"> 45 <body onload="runTest()">
48 <p>Tests list of user metrics codes and invocations.</p> 46 <p>Tests list of user metrics codes and invocations.</p>
49 47
50 </body> 48 </body>
51 </html> 49 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/devtools_app/InspectorFrontendHostImpl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698