| Index: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/tracing-test.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/tracing-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/tracing-test.js
|
| index 230a0128be2e65d525be84614b04a88c0e671465..7524497e30c7fe21381c67b521cf1415fe031b6d 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/tracing-test.js
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/tracing-test.js
|
| @@ -126,43 +126,8 @@ InspectorTest.invokeAsyncWithTracing = function(functionName, callback)
|
|
|
| function onStart()
|
| {
|
| - InspectorTest.invokePageFunctionAsync(functionName, done);
|
| + InspectorTest.evaluateInPageAsync(functionName + "()").then((data) => InspectorTest.stopTracing((devtoolsEvents) => callback(devtoolsEvents, data)));
|
| }
|
| -
|
| - function done()
|
| - {
|
| - InspectorTest.stopTracing(callback);
|
| - }
|
| -}
|
| -
|
| -InspectorTest._lastEvalId = 0;
|
| -InspectorTest._pendingEvalRequests = {};
|
| -
|
| -InspectorTest.invokePageFunctionAsync = function(functionName, callback)
|
| -{
|
| - var id = ++InspectorTest._lastEvalId;
|
| - InspectorTest._pendingEvalRequests[id] = callback;
|
| - var asyncEvalWrapper = function(callId, functionName)
|
| - {
|
| - function evalCallback(result)
|
| - {
|
| - evaluateInFrontend("InspectorTest.didInvokePageFunctionAsync(" + callId + ", " + JSON.stringify(result) + ");");
|
| - }
|
| - eval(functionName + "(" + evalCallback + ")");
|
| - }
|
| - InspectorTest.evaluateInPage("(" + asyncEvalWrapper.toString() + ")(" + id + ", unescape('" + escape(functionName) + "'))", function() { });
|
| -}
|
| -
|
| -InspectorTest.didInvokePageFunctionAsync = function(callId, value)
|
| -{
|
| - var callback = InspectorTest._pendingEvalRequests[callId];
|
| -
|
| - if (!callback) {
|
| - InspectorTest.addResult("Missing callback for async eval " + callId + ", perhaps callback invoked twice?");
|
| - return;
|
| - }
|
| - delete InspectorTest._pendingEvalRequests[callId];
|
| - callback(value);
|
| }
|
|
|
| }
|
|
|