| 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 InspectorTest.runProfilerTestSuite([ | 9 InspectorTest.runProfilerTestSuite([ |
| 10 function testProfiling(next) | 10 function testProfiling(next) |
| 11 { | 11 { |
| 12 var cpuProfiler = SDK.targetManager.mainTarget().cpuProfilerModel; | 12 var cpuProfiler = InspectorTest.cpuProfilerModel; |
| 13 var targetManager = SDK.targetManager; | 13 var targetManager = SDK.targetManager; |
| 14 targetManager.addEventListener(SDK.TargetManager.Events.SuspendState
Changed, onSuspendStateChanged); | 14 targetManager.addEventListener(SDK.TargetManager.Events.SuspendState
Changed, onSuspendStateChanged); |
| 15 var profilesPanel = UI.panels.js_profiler; | 15 var profilesPanel = UI.panels.js_profiler; |
| 16 InspectorTest.addSniffer(cpuProfiler, "stopRecording", stopRecording
); | 16 InspectorTest.addSniffer(cpuProfiler, "stopRecording", stopRecording
); |
| 17 InspectorTest.addSniffer(profilesPanel, "_addProfileHeader", onAddPr
ofileHeader); | 17 InspectorTest.addSniffer(profilesPanel, "_addProfileHeader", onAddPr
ofileHeader); |
| 18 profilesPanel.toggleRecord(); // Start profiling. | 18 profilesPanel.toggleRecord(); // Start profiling. |
| 19 | 19 |
| 20 function onAddProfileHeader() | 20 function onAddProfileHeader() |
| 21 { | 21 { |
| 22 profilesPanel.toggleRecord(); // Stop profiling. | 22 profilesPanel.toggleRecord(); // Stop profiling. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 50 </script> | 50 </script> |
| 51 </head> | 51 </head> |
| 52 <body onload="runTest()"> | 52 <body onload="runTest()"> |
| 53 <p> | 53 <p> |
| 54 Tests that profile removal right after stop profiling issued works. | 54 Tests that profile removal right after stop profiling issued works. |
| 55 | 55 |
| 56 <a href="http://crbug.com/476430">Bug 476430.</a> | 56 <a href="http://crbug.com/476430">Bug 476430.</a> |
| 57 </p> | 57 </p> |
| 58 </body> | 58 </body> |
| 59 </html> | 59 </html> |
| OLD | NEW |