Index: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js |
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js |
index ed9a774c3961d4e7949bc835463e4a495d4e50e5..de0d71b37772152f49b09c13b899205946a45736 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js |
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js |
@@ -31,6 +31,30 @@ InspectorTest.evaluateInInspectedPage = function(expression, callback) |
InspectorTest.sendCommand("Runtime.evaluate", { expression: expression }, callback); |
} |
+InspectorTest.runtimeEvaluatePromise = function(expression, objectGroup) |
+{ |
+ var callback; |
+ var promise = new Promise(fulfill => callback = fulfill); |
+ InspectorTest.sendCommand("Runtime.evaluate", { "expression": expression, "objectGroup": objectGroup }, callback); |
dgozman
2016/07/28 00:07:56
Let's do sendCommandPromise
kozy
2016/07/28 22:54:08
Done.
|
+ return promise; |
+} |
+ |
+InspectorTest.runtimePromiseThenPromise = function(promiseObjectId, returnByValue, generatePreview) |
+{ |
+ var callback; |
+ var promise = new Promise(fulfill => callback = fulfill); |
+ InspectorTest.sendCommand("Runtime.promiseThen", { "promiseObjectId": promiseObjectId, "returnByValue": returnByValue, "generatePreview": generatePreview }, callback); |
+ return promise; |
+} |
+ |
+InspectorTest.runtimeReleaseObjectPromise = function(objectId) |
+{ |
+ var callback; |
+ var promise = new Promise(fulfill => callback = fulfill); |
+ InspectorTest.sendCommand("Runtime.releaseObject", { "objectId": objectId }, callback); |
+ return promise; |
+} |
+ |
} |
var outputElement; |