OLD | NEW |
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="profiler-test.js"></script> | 4 <script src="profiler-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function test() | 7 function test() |
8 { | 8 { |
9 var profileAndExpectations = { | 9 var profileAndExpectations = { |
10 "title": "profile1", | 10 "title": "profile1", |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 "functionName": "D", | 104 "functionName": "D", |
105 "scriptId": "0", | 105 "scriptId": "0", |
106 "url": "a.js", | 106 "url": "a.js", |
107 "lineNumber": 425 | 107 "lineNumber": 425 |
108 }, | 108 }, |
109 "hitCount": 30, | 109 "hitCount": 30, |
110 "children": [] | 110 "children": [] |
111 } | 111 } |
112 ], | 112 ], |
113 "startTime": 0, | 113 "startTime": 0, |
114 "endTime": 1.000 | 114 "endTime": 1e6 |
115 } | 115 } |
116 }; | 116 }; |
117 var view = new WebInspector.CPUProfileView(profileAndExpectations); | 117 var view = new WebInspector.CPUProfileView(profileAndExpectations); |
118 view.viewSelectComboBox.setSelectedIndex(1); | 118 view.viewSelectComboBox.setSelectedIndex(1); |
119 view._changeView(); | 119 view._changeView(); |
120 var tree = view.profileDataGridTree; | 120 var tree = view.profileDataGridTree; |
121 if (!tree) | 121 if (!tree) |
122 InspectorTest.addResult("no tree"); | 122 InspectorTest.addResult("no tree"); |
123 var node = tree.children[0]; | 123 var node = tree.children[0]; |
124 if (!node) | 124 if (!node) |
125 InspectorTest.addResult("no node"); | 125 InspectorTest.addResult("no node"); |
126 while (node) { | 126 while (node) { |
127 InspectorTest.addResult(node.callUID + ": " + node.functionName + " " +
node.self + " " + node.total + " " + node.element().textContent); | 127 InspectorTest.addResult(node.callUID + ": " + node.functionName + " " +
node.self + " " + node.total + " " + node.element().textContent); |
128 node = node.traverseNextNode(true, null, true); | 128 node = node.traverseNextNode(true, null, true); |
129 } | 129 } |
130 InspectorTest.completeProfilerTest(); | 130 InspectorTest.completeProfilerTest(); |
131 } | 131 } |
132 | 132 |
133 </script> | 133 </script> |
134 </head> | 134 </head> |
135 <body onload="runTest()"> | 135 <body onload="runTest()"> |
136 <p> | 136 <p> |
137 Tests bottom-up view self and total time calculation in CPU profiler. | 137 Tests bottom-up view self and total time calculation in CPU profiler. |
138 </p> | 138 </p> |
139 </body> | 139 </body> |
140 </html> | 140 </html> |
OLD | NEW |