OLD | NEW |
1 function initialize_TracingTest() | 1 function initialize_TracingTest() |
2 { | 2 { |
3 | 3 |
4 InspectorTest.preloadPanel("timeline"); | 4 InspectorTest.preloadPanel("timeline"); |
5 | 5 |
6 InspectorTest.tracingManager = function() | 6 InspectorTest.tracingManager = function() |
7 { | 7 { |
8 if (WebInspector.panels.timeline._tracingManager) | 8 if (WebInspector.panels.timeline._tracingManager) |
9 return WebInspector.panels.timeline._tracingManager; | 9 return WebInspector.panels.timeline._tracingManager; |
10 if (!InspectorTest._tracingManager) | 10 if (!InspectorTest._tracingManager) |
11 InspectorTest._tracingManager = new WebInspector.TracingManager(); | 11 InspectorTest._tracingManager = new WebInspector.TracingManager(); |
12 return InspectorTest._tracingManager; | 12 return InspectorTest._tracingManager; |
13 } | 13 } |
14 | 14 |
15 InspectorTest.tracingModel = function() | 15 InspectorTest.tracingModel = function() |
16 { | 16 { |
17 if (!InspectorTest._tracingModel) | 17 if (!InspectorTest._tracingModel) |
18 InspectorTest._tracingModel = new WebInspector.TracingModel(); | 18 InspectorTest._tracingModel = new WebInspector.TracingModel(); |
19 return InspectorTest._tracingModel; | 19 return InspectorTest._tracingModel; |
20 } | 20 } |
21 | 21 |
22 InspectorTest.tracingTimelineModel = function() | 22 InspectorTest.tracingTimelineModel = function() |
23 { | 23 { |
24 if (!InspectorTest._tracingTimelineModel) | 24 if (!InspectorTest._tracingTimelineModel) |
25 InspectorTest._tracingTimelineModel = new WebInspector.TracingTimelineMo
del(InspectorTest.tracingManager(), InspectorTest.tracingModel(), new WebInspect
or.TimelineRecordHiddenTypeFilter([])); | 25 InspectorTest._tracingTimelineModel = new WebInspector.TimelineModel(Ins
pectorTest.tracingManager(), InspectorTest.tracingModel(), new WebInspector.Time
lineRecordHiddenTypeFilter([])); |
26 return InspectorTest._tracingTimelineModel; | 26 return InspectorTest._tracingTimelineModel; |
27 } | 27 } |
28 | 28 |
29 InspectorTest.invokeWithTracing = function(functionName, callback, additionalCat
egories) | 29 InspectorTest.invokeWithTracing = function(functionName, callback, additionalCat
egories) |
30 { | 30 { |
31 InspectorTest.tracingTimelineModel().addEventListener(WebInspector.TimelineM
odel.Events.RecordingStarted, onTracingStarted, this); | 31 InspectorTest.tracingTimelineModel().addEventListener(WebInspector.TimelineM
odel.Events.RecordingStarted, onTracingStarted, this); |
32 var categories = "-*,disabled-by-default-devtools.timeline*"; | 32 var categories = "-*,disabled-by-default-devtools.timeline*"; |
33 if (additionalCategories) | 33 if (additionalCategories) |
34 categories += "," + additionalCategories; | 34 categories += "," + additionalCategories; |
35 InspectorTest.tracingTimelineModel()._startRecordingWithCategories(categorie
s); | 35 InspectorTest.tracingTimelineModel()._startRecordingWithCategories(categorie
s); |
(...skipping 11 matching lines...) Expand all Loading... |
47 } | 47 } |
48 | 48 |
49 function onTracingComplete(event) | 49 function onTracingComplete(event) |
50 { | 50 { |
51 InspectorTest.tracingTimelineModel().removeEventListener(WebInspector.Ti
melineModel.Events.RecordingStopped, onTracingComplete, this); | 51 InspectorTest.tracingTimelineModel().removeEventListener(WebInspector.Ti
melineModel.Events.RecordingStopped, onTracingComplete, this); |
52 callback(); | 52 callback(); |
53 } | 53 } |
54 } | 54 } |
55 | 55 |
56 } | 56 } |
OLD | NEW |