| Index: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html
|
| index 98b96f7b638d971ebb8728b16f095a2283147439..964923de02c6eae259df4d16bad08e4410a096e3 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html
|
| @@ -283,28 +283,9 @@ InspectorTest.evaluateInPage = function(string, callback)
|
| });
|
| };
|
|
|
| -InspectorTest._asyncCallbacks = {};
|
| -InspectorTest._asyncCallbackId = 0;
|
| -
|
| -InspectorTest.evaluateInPageAsync = function(string, callback)
|
| -{
|
| - var id = ++InspectorTest._asyncCallbackId;
|
| - InspectorTest._asyncCallbacks[id] = callback;
|
| - var callbackString = "testRunner.evaluateInWebInspector.bind(testRunner, 42, \"InspectorTest._evaluateInPageAsyncCompleted(" + id + ")\")";
|
| - var code = string.replace("%callback", callbackString);
|
| - InspectorTest.evaluateInPage(code);
|
| -};
|
| -
|
| -InspectorTest._evaluateInPageAsyncCompleted = function(id)
|
| +InspectorTest.evaluateInPageAsync = function(expression)
|
| {
|
| - var callback = InspectorTest._asyncCallbacks[id];
|
| - delete InspectorTest._asyncCallbacks[id];
|
| - if (!callback) {
|
| - InspectorTest.log("Error: no callback for async function");
|
| - InspectorTest.completeTest();
|
| - return;
|
| - }
|
| - callback();
|
| + return InspectorTest.sendCommandPromise("Runtime.evaluate", { "expression": expression, awaitPromise: true }).then((message) => message.result.result.value);
|
| }
|
|
|
| InspectorTest.completeTestIfError = function(messageObject)
|
|
|