Chromium Code Reviews| 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> |