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

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

Issue 396993003: DevTools: get rid of WebInspector.cssModel, use target models instead (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
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.activeTarget()); 6 InspectorTest.tracingModel = new WebInspector.TracingModel(WebInspector.targetMa nager.mainTarget());
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(categoryFilter, functionName, callbac k)
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(categoryFil ter);
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698