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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-calculate-time.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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
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="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 // Profile for 1070ms, 2140 samples. 9 // Profile for 1070ms, 2140 samples.
10 var profileAndExpectations = { 10 var profileAndExpectations = {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 ] 87 ]
88 }, 88 },
89 ] 89 ]
90 }, 90 },
91 "idleTime": 202.88199791684747, 91 "idleTime": 202.88199791684747,
92 "startTime": 1375445600.000847, 92 "startTime": 1375445600.000847,
93 "endTime": 1375445601.070847, 93 "endTime": 1375445601.070847,
94 "samples": [ 1, 2 ] 94 "samples": [ 1, 2 ]
95 }; 95 };
96 profileAndExpectations.root = profileAndExpectations.head; 96 profileAndExpectations.root = profileAndExpectations.head;
97 WebInspector.ProfileTreeModel.prototype._assignDepthsAndParents.call(profile AndExpectations); 97 SDK.ProfileTreeModel.prototype._assignDepthsAndParents.call(profileAndExpect ations);
98 WebInspector.ProfileTreeModel.prototype._calculateTotals(profileAndExpectati ons.head); 98 SDK.ProfileTreeModel.prototype._calculateTotals(profileAndExpectations.head) ;
99 function checkExpectations(node) 99 function checkExpectations(node)
100 { 100 {
101 if (Math.abs(node.selfTime - node.expectedSelfTime) > 0.0001) { 101 if (Math.abs(node.selfTime - node.expectedSelfTime) > 0.0001) {
102 InspectorTest.addResult("totalTime: " + node.totalTime + ", expected :" + node.expectedTotalTime); 102 InspectorTest.addResult("totalTime: " + node.totalTime + ", expected :" + node.expectedTotalTime);
103 return false; 103 return false;
104 } 104 }
105 if (Math.abs(node.totalTime - node.expectedTotalTime) > 0.0001) { 105 if (Math.abs(node.totalTime - node.expectedTotalTime) > 0.0001) {
106 InspectorTest.addResult("totalTime: " + node.totalTime + ", expected :" + node.expectedTotalTime); 106 InspectorTest.addResult("totalTime: " + node.totalTime + ", expected :" + node.expectedTotalTime);
107 return false; 107 return false;
108 } 108 }
(...skipping 11 matching lines...) Expand all
120 } 120 }
121 121
122 </script> 122 </script>
123 </head> 123 </head>
124 <body onload="runTest()"> 124 <body onload="runTest()">
125 <p> 125 <p>
126 Tests self and total time calculation in CPU profiler. 126 Tests self and total time calculation in CPU profiler.
127 </p> 127 </p>
128 </body> 128 </body>
129 </html> 129 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698