| <html> |
| <head> |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script src="../../http/tests/inspector/timeline-test.js"></script> |
| <script> |
| |
| function test() |
| { |
| TestTimelineControllerClient = function() |
| { |
| this._hadLoadingProgress = false; |
| } |
| |
| TestTimelineControllerClient.prototype = { |
| recordingProgress: function() |
| { |
| if (!controller) |
| return; |
| InspectorTest.addResult("TimelineControllerClient.recordingProgress"); |
| controller.stopRecording(); |
| controller = null; |
| }, |
| |
| loadingStarted: function() |
| { |
| InspectorTest.addResult("TimelineControllerClient.loadingStarted"); |
| }, |
| |
| loadingProgress: function() |
| { |
| if (this._hadLoadingProgress) |
| return; |
| this._hadLoadingProgress = true; |
| InspectorTest.addResult("TimelineControllerClient.loadingProgress"); |
| }, |
| |
| processingStarted: function() |
| { |
| InspectorTest.addResult("TimelineControllerClient.processingStarted"); |
| }, |
| |
| loadingComplete: function() |
| { |
| InspectorTest.addResult("TimelineControllerClient.loadingComplete"); |
| InspectorTest.completeTest(); |
| } |
| }; |
| var performanceModel = new Timeline.PerformanceModel(); |
| var controller = new Timeline.TimelineController(InspectorTest.tracingManager, performanceModel, new TestTimelineControllerClient()); |
| controller.startRecording({}, []).then(() => { |
| InspectorTest.addResult("TimelineControllerClient.recordingStarted"); |
| }); |
| } |
| |
| </script> |
| </head> |
| |
| <body onload="runTest()"> |
| <p> |
| Tests that buffer usage update are sent when recording trace events and |
| TimelineLifecycleDelegate methods are properly invoked in the expected order. |
| </p> |
| </body> |
| </html> |