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

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

Issue 557013005: DevTools: extract TracingManager from TracingModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments addressed Created 6 years, 3 months 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
« no previous file with comments | « LayoutTests/inspector/tracing.html ('k') | LayoutTests/inspector/tracing/buffer-usage.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.mainTarget()); 6 InspectorTest.tracingManager = WebInspector.panels.timeline._tracingManager || n ew WebInspector.TracingManager();
7 InspectorTest.tracingTimelineModel = new WebInspector.TracingTimelineModel(Inspe ctorTest.tracingModel, new WebInspector.TimelineRecordHiddenTypeFilter([])); 7 InspectorTest.tracingModel = new WebInspector.TracingModel();
8 InspectorTest.tracingTimelineModel = new WebInspector.TracingTimelineModel(Inspe ctorTest.tracingManager, InspectorTest.tracingModel, new WebInspector.TimelineRe cordHiddenTypeFilter([]));
8 9
9 InspectorTest.invokeWithTracing = function(functionName, callback, additionalCat egories) 10 InspectorTest.invokeWithTracing = function(functionName, callback, additionalCat egories)
10 { 11 {
11 InspectorTest.tracingTimelineModel.addEventListener(WebInspector.TimelineMod el.Events.RecordingStarted, onTracingStarted, this); 12 InspectorTest.tracingTimelineModel.addEventListener(WebInspector.TimelineMod el.Events.RecordingStarted, onTracingStarted, this);
12 var categories = "-*,disabled-by-default-devtools.timeline*"; 13 var categories = "-*,disabled-by-default-devtools.timeline*";
13 if (additionalCategories) 14 if (additionalCategories)
14 categories += "," + additionalCategories; 15 categories += "," + additionalCategories;
15 InspectorTest.tracingTimelineModel._startRecordingWithCategories(categories) ; 16 InspectorTest.tracingTimelineModel._startRecordingWithCategories(categories) ;
16 17
17 function onTracingStarted(event) 18 function onTracingStarted(event)
18 { 19 {
19 InspectorTest.tracingTimelineModel.removeEventListener(WebInspector.Time lineModel.Events.RecordingStarted, onTracingStarted, this); 20 InspectorTest.tracingTimelineModel.removeEventListener(WebInspector.Time lineModel.Events.RecordingStarted, onTracingStarted, this);
20 InspectorTest.invokePageFunctionAsync(functionName, onPageActionsDone); 21 InspectorTest.invokePageFunctionAsync(functionName, onPageActionsDone);
21 } 22 }
22 23
23 function onPageActionsDone() 24 function onPageActionsDone()
24 { 25 {
25 InspectorTest.tracingTimelineModel.addEventListener(WebInspector.Timelin eModel.Events.RecordingStopped, onTracingComplete, this); 26 InspectorTest.tracingTimelineModel.addEventListener(WebInspector.Timelin eModel.Events.RecordingStopped, onTracingComplete, this);
26 InspectorTest.tracingTimelineModel.stopRecording(); 27 InspectorTest.tracingTimelineModel.stopRecording();
27 } 28 }
28 29
29 function onTracingComplete(event) 30 function onTracingComplete(event)
30 { 31 {
31 InspectorTest.tracingTimelineModel.removeEventListener(WebInspector.Time lineModel.Events.RecordingStopped, onTracingComplete, this); 32 InspectorTest.tracingTimelineModel.removeEventListener(WebInspector.Time lineModel.Events.RecordingStopped, onTracingComplete, this);
32 callback(); 33 callback();
33 } 34 }
34 } 35 }
35 36
36 } 37 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/tracing.html ('k') | LayoutTests/inspector/tracing/buffer-usage.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698