Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: LayoutTests/inspector/tracing-test.js

Issue 715803002: DevTools: merge TracingTimelineModel into TimelineModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/tracing-session-id.html ('k') | LayoutTests/inspector/tracing/console-timeline.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698