3 <script src=
"../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../http/tests/inspector/timeline-test.js"></script>
5 <script src=
"profiler/profiler-test.js"></script>
6 <script src=
"audits/audits-test.js"></script>
11 InspectorFrontendHost
.recordEnumeratedHistogram = function(name
, code
)
13 if (name
=== "DevTools.ActionTaken")
14 InspectorTest
.addResult("Action taken: " + nameOf(WebInspector
.UserMetrics
._ActionCodes
, code
));
15 else if (name
=== "DevTools.PanelShown")
16 InspectorTest
.addResult("Panel shown: " + nameOf(WebInspector
.UserMetrics
._PanelCodes
, code
));
19 function nameOf(object
, code
)
21 for (var name
in object
) {
22 if (object
[name
] === code
)
28 InspectorTest
.addResult("recordActionTaken:");
29 InspectorTest
.dump(WebInspector
.UserMetrics
._ActionCodes
);
30 WebInspector
.userMetrics
.WindowDocked
.record();
31 WebInspector
.userMetrics
.WindowUndocked
.record();
33 InspectorTest
.addResult("\nrecordPanelShown:");
34 InspectorTest
.dump(WebInspector
.UserMetrics
._PanelCodes
);
35 WebInspector
.ProfilesPanel
.show();
36 WebInspector
.TimelinePanel
.show();
37 WebInspector
.AuditsPanel
.show();
39 InspectorTest
.completeTest();
45 <body onload=
"runTest()">
46 <p>Tests list of user metrics codes and invocations.
</p>