OLD | NEW |
1 var initialize_Timeline = function() { | 1 var initialize_Timeline = function() { |
2 | 2 |
3 InspectorTest.preloadPanel("timeline"); | 3 InspectorTest.preloadPanel("timeline"); |
4 WebInspector.TempFile = InspectorTest.TempFileMock; | 4 WebInspector.TempFile = InspectorTest.TempFileMock; |
5 | 5 |
6 // Scrub values when printing out these properties in the record or data field. | 6 // Scrub values when printing out these properties in the record or data field. |
7 InspectorTest.timelinePropertyFormatters = { | 7 InspectorTest.timelinePropertyFormatters = { |
8 children: "formatAsTypeName", | 8 children: "formatAsTypeName", |
9 endTime: "formatAsTypeName", | 9 endTime: "formatAsTypeName", |
10 requestId: "formatAsTypeName", | 10 requestId: "formatAsTypeName", |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 InspectorTest.timelineFrameModel = function() | 69 InspectorTest.timelineFrameModel = function() |
70 { | 70 { |
71 return WebInspector.panels.timeline._frameModel; | 71 return WebInspector.panels.timeline._frameModel; |
72 } | 72 } |
73 | 73 |
74 InspectorTest.startTimeline = function(callback) | 74 InspectorTest.startTimeline = function(callback) |
75 { | 75 { |
76 var panel = WebInspector.panels.timeline; | 76 var panel = WebInspector.panels.timeline; |
77 function onRecordingStarted() | 77 function onRecordingStarted() |
78 { | 78 { |
79 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor
dingStarted, onRecordingStarted, this) | 79 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor
dingStarted, onRecordingStarted, this); |
80 callback(); | 80 callback(); |
81 } | 81 } |
82 panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingSta
rted, onRecordingStarted, this) | 82 panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingSta
rted, onRecordingStarted, this); |
83 panel._captureJSProfileSetting.set(false); | |
84 panel._toggleRecording(); | 83 panel._toggleRecording(); |
85 }; | 84 }; |
86 | 85 |
87 InspectorTest.stopTimeline = function(callback) | 86 InspectorTest.stopTimeline = function(callback) |
88 { | 87 { |
89 var panel = WebInspector.panels.timeline; | 88 var panel = WebInspector.panels.timeline; |
90 function didStop() | 89 function didStop() |
91 { | 90 { |
92 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor
dingStopped, didStop, this) | 91 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor
dingStopped, didStop, this) |
93 InspectorTest.runAfterPendingDispatches(callback); | 92 InspectorTest.runAfterPendingDispatches(callback); |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 if (!--count) { | 398 if (!--count) { |
400 callback(); | 399 callback(); |
401 return; | 400 return; |
402 } | 401 } |
403 if (window.testRunner) | 402 if (window.testRunner) |
404 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window,
makeFrame)); | 403 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window,
makeFrame)); |
405 else | 404 else |
406 window.requestAnimationFrame(makeFrame); | 405 window.requestAnimationFrame(makeFrame); |
407 } | 406 } |
408 } | 407 } |
OLD | NEW |