Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector/tracing.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector/tracing.html b/third_party/WebKit/LayoutTests/inspector/tracing.html |
| index 748ed3811e299100eac1df2c858e0215d6e325a5..49389ff5b2a0b9a461162f1e7cc8b1efde3a9c0a 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector/tracing.html |
| +++ b/third_party/WebKit/LayoutTests/inspector/tracing.html |
| @@ -15,20 +15,13 @@ div#test { |
| function initialize_TracingManagerClient() |
| { |
| -InspectorTest.TracingManagerClient = function(tracingManager, callback) |
| +InspectorTest.TracingManagerClient = function(callback) |
| { |
| - this._tracingManager = tracingManager; |
| this._completionCallback = callback; |
| this._tracingModel = InspectorTest.createTracingModel(); |
| } |
| InspectorTest.TracingManagerClient.prototype = { |
| - tracingStarted: function() |
| - { |
| - this._tracingModel.reset(); |
| - InspectorTest.evaluateInPage("doWork()", this._tracingManager.stop.bind(this._tracingManager)); |
| - }, |
| - |
| traceEventsCollected: function(events) |
| { |
| this._tracingModel.addEvents(events); |
| @@ -54,13 +47,13 @@ function doWork() |
| function test() |
| { |
| - var tracingClient = new InspectorTest.TracingManagerClient(InspectorTest.tracingManager, runEventsSanityCheck); |
| - InspectorTest.tracingManager.start(tracingClient, "", "", onTracingStarted); |
| - |
| - function onTracingStarted(error) |
| - { |
| - InspectorTest.addResult("Tracing started (error: " + JSON.stringify(error) + ")"); |
| - } |
| + var tracingClient = new InspectorTest.TracingManagerClient(runEventsSanityCheck); |
| + var tracingManager = InspectorTest.tracingManager; |
| + tracingManager.start(tracingClient, "", "").then(() => { |
|
alph
2017/02/28 03:11:24
await
|
| + InspectorTest.addResult("Tracing started"); |
| + tracingClient._tracingModel.reset(); |
| + InspectorTest.evaluateInPage("doWork()", tracingManager.stop.bind(tracingManager)); |
| + }); |
| function runEventsSanityCheck(tracingModel) |
| { |