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="../../http/tests/inspector/timeline-test.js"></script> | 4 <script src="../../http/tests/inspector/timeline-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function test() | 7 function test() |
8 { | 8 { |
9 TestTimelineControllerClient = function() | 9 TestTimelineControllerClient = function() |
10 { | 10 { |
11 this._hadLoadingProgress = false; | 11 this._hadLoadingProgress = false; |
12 } | 12 } |
13 | 13 |
14 TestTimelineControllerClient.prototype = { | 14 TestTimelineControllerClient.prototype = { |
15 recordingStarted: function() | |
16 { | |
17 InspectorTest.addResult("TimelineControllerClient.recordingStarted")
; | |
18 }, | |
19 | |
20 recordingProgress: function() | 15 recordingProgress: function() |
21 { | 16 { |
22 if (!controller) | 17 if (!controller) |
23 return; | 18 return; |
24 InspectorTest.addResult("TimelineControllerClient.recordingProgress"
); | 19 InspectorTest.addResult("TimelineControllerClient.recordingProgress"
); |
25 controller.stopRecording(); | 20 controller.stopRecording(); |
26 controller = null; | 21 controller = null; |
27 }, | 22 }, |
28 | 23 |
29 loadingStarted: function() | 24 loadingStarted: function() |
(...skipping 15 matching lines...) Expand all Loading... |
45 }, | 40 }, |
46 | 41 |
47 loadingComplete: function() | 42 loadingComplete: function() |
48 { | 43 { |
49 InspectorTest.addResult("TimelineControllerClient.loadingComplete"); | 44 InspectorTest.addResult("TimelineControllerClient.loadingComplete"); |
50 InspectorTest.completeTest(); | 45 InspectorTest.completeTest(); |
51 } | 46 } |
52 }; | 47 }; |
53 var performanceModel = new Timeline.PerformanceModel(); | 48 var performanceModel = new Timeline.PerformanceModel(); |
54 var controller = new Timeline.TimelineController(SDK.targetManager.mainTarge
t(), performanceModel, new TestTimelineControllerClient()); | 49 var controller = new Timeline.TimelineController(SDK.targetManager.mainTarge
t(), performanceModel, new TestTimelineControllerClient()); |
55 controller.startRecording({}, []); | 50 controller.startRecording({}, []).then(() => { |
| 51 InspectorTest.addResult("TimelineControllerClient.recordingStarted"); |
| 52 }); |
56 } | 53 } |
57 | 54 |
58 </script> | 55 </script> |
59 </head> | 56 </head> |
60 | 57 |
61 <body onload="runTest()"> | 58 <body onload="runTest()"> |
62 <p> | 59 <p> |
63 Tests that buffer usage update are sent when recording trace events and | 60 Tests that buffer usage update are sent when recording trace events and |
64 TimelineLifecycleDelegate methods are properly invoked in the expected order. | 61 TimelineLifecycleDelegate methods are properly invoked in the expected order. |
65 </p> | 62 </p> |
66 </body> | 63 </body> |
67 </html> | 64 </html> |
OLD | NEW |