3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="profiler-test.js"></script>
9 var profileAndExpectations = {
13 "functionName": "(root)",
21 "functionName": "(idle)",
94 WebInspector.inspectorView.showPanel("profiles");
95 var view = new WebInspector.CPUProfileView(profileAndExpectations);
96 view.viewSelectComboBox.setSelectedIndex(1);
98 var tree = view.profileDataGridTree;
100 InspectorTest.addResult("no tree");
101 var node = tree.children[0];
103 InspectorTest.addResult("no node");
105 InspectorTest.addResult(node.callUID + ": " + node.functionName + " " + node.selfTime + " " + node.totalTime + " " + JSON.stringify(node.data));
106 node = node.traverseNextNode(true, null, true);
108 InspectorTest.completeProfilerTest();
113 <body onload="runTest()">
115 Tests bottom-up view self and total time calculation in CPU profiler.