3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"profiler-test.js"></script>
9 var profileAndExpectations
= {
11 "target": function() {
12 return WebInspector
.targetManager
.targets()[0];
16 "functionName": "(root)",
24 "functionName": "(idle)",
97 var view
= new WebInspector
.CPUProfileView(profileAndExpectations
);
98 view
.viewSelectComboBox
.setSelectedIndex(1);
100 var tree
= view
.profileDataGridTree
;
102 InspectorTest
.addResult("no tree");
103 var node
= tree
.children
[0];
105 InspectorTest
.addResult("no node");
107 InspectorTest
.addResult(node
.callUID
+ ": " + node
.functionName
+ " " + node
.selfTime
+ " " + node
.totalTime
+ " " + JSON
.stringify(node
.data
));
108 node
= node
.traverseNextNode(true, null, true);
110 InspectorTest
.completeProfilerTest();
115 <body onload=
"runTest()">
117 Tests bottom-up view self and total time calculation in CPU profiler.