Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | |
| 4 <script src="profiler-test.js"></script> | |
| 5 <script> | |
| 6 | |
| 7 function test() | |
| 8 { | |
| 9 InspectorTest.runProfilerTestSuite([ | |
| 10 function testDeepProfile(next) | |
| 11 { | |
| 12 function findPageFunctionInProfileView(view) | |
| 13 { | |
| 14 InspectorTest.addResult(`Max profile tree depth: ${maxDepth(view .profile.root)}`); | |
| 15 next(); | |
| 16 } | |
| 17 function maxDepth(node) | |
| 18 { | |
| 19 return Math.max.apply(Math, node.children.map(maxDepth).concat(0 )) + 1; | |
| 20 } | |
| 21 InspectorTest.showProfileWhenAdded("profile"); | |
| 22 InspectorTest.waitUntilProfileViewIsShown("profile", findPageFunctio nInProfileView); | |
| 23 InspectorTest.evaluateInPage("f = d => d ? f(d - 1) : console.profil e('profile'); f(1000); console.profileEnd('profile');", () => 0); | |
|
pfeldman
2016/05/28 01:43:14
Lets test what you fix.
alph
2016/05/28 02:21:52
Redone everything.
| |
| 24 } | |
| 25 ]); | |
| 26 } | |
| 27 | |
| 28 </script> | |
| 29 </head> | |
| 30 <body onload="runTest()"> | |
| 31 <p> | |
| 32 Tests that CPU profiler can retrieve deeply nested profile trees. | |
| 33 | |
| 34 </p> | |
| 35 </body> | |
| 36 </html> | |
| OLD | NEW |