OLD | NEW |
---|---|
1 function initialize_TracingTest() | 1 function initialize_TracingTest() |
2 { | 2 { |
3 | 3 |
4 // FIXME: remove when tracing is out of experimental | 4 // FIXME: remove when tracing is out of experimental |
5 WebInspector.inspectorView.showPanel("timeline"); | 5 WebInspector.inspectorView.showPanel("timeline"); |
6 InspectorTest.tracingModel = new WebInspector.TracingModel(WebInspector.targetMa nager.activeTarget()); | 6 InspectorTest.tracingModel = new WebInspector.TracingModel(WebInspector.targetMa nager.activeTarget()); |
7 InspectorTest.tracingTimelineModel = new WebInspector.TracingTimelineModel(Inspe ctorTest.tracingModel, new WebInspector.TimelineRecordHiddenTypeFilter([])); | 7 InspectorTest.tracingTimelineModel = new WebInspector.TracingTimelineModel(Inspe ctorTest.tracingModel, new WebInspector.TimelineRecordHiddenTypeFilter([])); |
8 | 8 |
9 InspectorTest.invokeWithTracing = function(categoryFilter, functionName, callbac k) | 9 InspectorTest.invokeWithTracing = function(functionName, callback) |
10 { | 10 { |
11 InspectorTest.tracingTimelineModel.addEventListener(WebInspector.TimelineMod el.Events.RecordingStarted, onTracingStarted, this); | 11 InspectorTest.tracingTimelineModel.addEventListener(WebInspector.TimelineMod el.Events.RecordingStarted, onTracingStarted, this); |
12 InspectorTest.tracingTimelineModel._startRecordingWithCategories(categoryFil ter); | 12 InspectorTest.tracingTimelineModel._startRecordingWithCategories("-*,devtool s,disabled-by-default-devtools.timeline*"); |
caseq
2014/07/17 11:40:38
nit: I think it's about the time to drop bare 'dev
yurys
2014/07/17 11:45:19
Good catch. Done!
| |
13 | 13 |
14 function onTracingStarted(event) | 14 function onTracingStarted(event) |
15 { | 15 { |
16 InspectorTest.tracingTimelineModel.removeEventListener(WebInspector.Time lineModel.Events.RecordingStarted, onTracingStarted, this); | 16 InspectorTest.tracingTimelineModel.removeEventListener(WebInspector.Time lineModel.Events.RecordingStarted, onTracingStarted, this); |
17 InspectorTest.invokePageFunctionAsync(functionName, onPageActionsDone); | 17 InspectorTest.invokePageFunctionAsync(functionName, onPageActionsDone); |
18 } | 18 } |
19 | 19 |
20 function onPageActionsDone() | 20 function onPageActionsDone() |
21 { | 21 { |
22 InspectorTest.tracingTimelineModel.addEventListener(WebInspector.Timelin eModel.Events.RecordingStopped, onTracingComplete, this); | 22 InspectorTest.tracingTimelineModel.addEventListener(WebInspector.Timelin eModel.Events.RecordingStopped, onTracingComplete, this); |
23 InspectorTest.tracingTimelineModel.stopRecording(); | 23 InspectorTest.tracingTimelineModel.stopRecording(); |
24 } | 24 } |
25 | 25 |
26 function onTracingComplete(event) | 26 function onTracingComplete(event) |
27 { | 27 { |
28 InspectorTest.tracingTimelineModel.removeEventListener(WebInspector.Time lineModel.Events.RecordingStopped, onTracingComplete, this); | 28 InspectorTest.tracingTimelineModel.removeEventListener(WebInspector.Time lineModel.Events.RecordingStopped, onTracingComplete, this); |
29 callback(); | 29 callback(); |
30 } | 30 } |
31 } | 31 } |
32 | 32 |
33 } | 33 } |
OLD | NEW |