Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js

Issue 2185233002: [DevTools] Added Runtime.awaitPromise protocol method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698