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

Unified Diff: LayoutTests/inspector/tracing.html

Issue 557013005: DevTools: extract TracingManager from TracingModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/tracing-test.js » ('j') | Source/devtools/front_end/sdk/TracingModel.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/tracing.html
diff --git a/LayoutTests/inspector/tracing.html b/LayoutTests/inspector/tracing.html
index d86f24e2df5048906d9f957aa65700420259fde4..dc2f4fd2c12d199ede46e489d8d7018cdc5f6574 100644
--- a/LayoutTests/inspector/tracing.html
+++ b/LayoutTests/inspector/tracing.html
@@ -21,6 +21,9 @@ function test()
{
WebInspector.inspectorView.showPanel("timeline");
+ var tracingManager = new WebInspector.TracingManager();
+ var tracingModel = new WebInspector.TracingModel();
+
function runEventsSanityCheck()
{
var events = [];
@@ -61,22 +64,27 @@ function test()
function onTracingComplete()
{
- tracingModel.removeEventListener(WebInspector.TracingModel.Events.TracingComplete, onTracingComplete);
+ tracingManager.removeEventListener(WebInspector.TracingManager.Events.TracingComplete, onTracingComplete);
InspectorTest.addResult("Tracing complete");
runEventsSanityCheck();
InspectorTest.completeTest();
}
- var tracingModel = new WebInspector.TracingModel(WebInspector.targetManager.mainTarget());
- tracingModel.start("", "", onTracingStarted);
+ tracingManager.start("", "", onTracingStarted);
+ tracingManager.addEventListener(WebInspector.TracingManager.Events.EventsCollected, onEventsCollected);
loislo 2014/09/10 09:59:11 style: extra space
function onTracingStarted(error)
{
InspectorTest.addResult("Tracing started (error: " + JSON.stringify(error) + ")");
+ tracingModel.reset();
InspectorTest.evaluateInPage("doWork()", function() {
- tracingModel.addEventListener(WebInspector.TracingModel.Events.TracingComplete, onTracingComplete);
- tracingModel.stop(onTracingComplete);
+ tracingManager.addEventListener(WebInspector.TracingManager.Events.TracingComplete, onTracingComplete);
+ tracingManager.stop(onTracingComplete);
loislo 2014/09/10 09:59:11 looks like it would be called twice. Is it expecte
caseq 2014/09/10 11:59:56 It's been there before and it's not really used in
});
}
+ function onEventsCollected(event)
loislo 2014/09/10 09:59:11 style: new line
caseq 2014/09/10 11:59:56 done.
+ {
+ tracingModel.addEvents(event.data);
+ }
}
</script>
« no previous file with comments | « no previous file | LayoutTests/inspector/tracing-test.js » ('j') | Source/devtools/front_end/sdk/TracingModel.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698