| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource
s/protocol-test.js"></script> | 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource
s/protocol-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 if (window.testRunner) { | 5 if (window.testRunner) { |
| 6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
| 7 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
| 8 } | 8 } |
| 9 | 9 |
| 10 function test() | 10 function test() |
| 11 { | 11 { |
| 12 InspectorTest.sendCommand("Profiler.enable", {}); | |
| 13 InspectorTest.sendCommand("Profiler.start", {}, didStartFrontendProfile); | 12 InspectorTest.sendCommand("Profiler.start", {}, didStartFrontendProfile); |
| 14 function didStartFrontendProfile(messageObject) | 13 function didStartFrontendProfile(messageObject) |
| 15 { | 14 { |
| 16 if (!InspectorTest.expectedSuccess("startFrontendProfile", messageObject
)) | 15 if (!InspectorTest.expectedSuccess("startFrontendProfile", messageObject
)) |
| 17 return; | 16 return; |
| 18 InspectorTest.sendCommand("Runtime.evaluate", {expression: "console.prof
ile('Profile 1');"}, didStartConsoleProfile); | 17 InspectorTest.sendCommand("Runtime.evaluate", {expression: "console.prof
ile('Profile 1');"}, didStartConsoleProfile); |
| 19 } | 18 } |
| 20 | 19 |
| 21 function didStartConsoleProfile(messageObject) | 20 function didStartConsoleProfile(messageObject) |
| 22 { | 21 { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 53 } | 52 } |
| 54 } | 53 } |
| 55 </script> | 54 </script> |
| 56 </head> | 55 </head> |
| 57 <body onload="runTest()"> | 56 <body onload="runTest()"> |
| 58 <p> | 57 <p> |
| 59 Test that profiler is able to record a profile. | 58 Test that profiler is able to record a profile. |
| 60 Also it tests that profiler returns an error when it unable to find the profile. | 59 Also it tests that profiler returns an error when it unable to find the profile. |
| 61 </body> | 60 </body> |
| 62 </html> | 61 </html> |
| OLD | NEW |