Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / tracing-test.js
blob9ae7dc543f9be64cc0f651992f23ef29a68ecd33
1 function initialize_TracingTest()
4 InspectorTest.preloadPanel("timeline");
5 WebInspector.TempFile = InspectorTest.TempFileMock;
7 InspectorTest.createTracingModel = function()
9     return new WebInspector.TracingModel(new WebInspector.TempFileBackingStorage("tracing"));
12 InspectorTest.tracingModel = function()
14     return WebInspector.panels.timeline._tracingModel;
17 InspectorTest.tracingTimelineModel = function()
19     return WebInspector.panels.timeline._model;
22 InspectorTest.invokeWithTracing = function(functionName, callback, additionalCategories, enableJSSampling)
24     var categories = "-*,disabled-by-default-devtools.timeline*,devtools.timeline";
25     if (additionalCategories)
26         categories += "," + additionalCategories;
27     InspectorTest.tracingTimelineModel()._startRecordingWithCategories(categories, enableJSSampling, tracingStarted);
29     function tracingStarted()
30     {
31         InspectorTest.invokePageFunctionAsync(functionName, onPageActionsDone);
32     }
34     function onPageActionsDone()
35     {
36         InspectorTest.tracingTimelineModel().addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, onTracingComplete, this);
37         InspectorTest.tracingTimelineModel().stopRecording();
38     }
40     function onTracingComplete(event)
41     {
42         InspectorTest.tracingTimelineModel().removeEventListener(WebInspector.TimelineModel.Events.RecordingStopped, onTracingComplete, this);
43         callback();
44     }