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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/console-fetch-logging.html

Issue 2208963002: [DevTools] Removed InspectorTest.invokeFunctionInPageAsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promise-from-other-tests
Patch Set: a Created 4 years, 4 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/console-fetch-logging.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/console-fetch-logging.html b/third_party/WebKit/LayoutTests/http/tests/inspector/console-fetch-logging.html
index 5be77c4e7683b6cd65c054a54e4ca5ae05db6a6b..6ec98851fd989fa633b454c1ea30bf09aa8b17c9 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/console-fetch-logging.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/console-fetch-logging.html
@@ -13,12 +13,15 @@ function requestHelper(method, url, callback)
{
setTimeout(callback, 0);
}
- makeFetch(url, {method: method}, delayCallback);
+ makeFetch(url, {method: method}).then(delayCallback);
}
-function makeRequests(callback)
+function makeRequests()
{
+ var callback;
+ var promise = new Promise((fulfill) => callback = fulfill);
step1();
+ return promise;
function step1()
{
@@ -53,7 +56,7 @@ function test()
{
function callback()
{
- InspectorTest.invokePageFunctionAsync("makeRequests", step2);
+ InspectorTest.callFunctionInPageAsync("makeRequests").then(step2);
}
InspectorTest.NetworkAgent.setMonitoringXHREnabled(true, callback);
}
@@ -62,7 +65,7 @@ function test()
{
function callback()
{
- InspectorTest.invokePageFunctionAsync("makeRequests", step3);
+ InspectorTest.callFunctionInPageAsync("makeRequests").then(step3);
}
InspectorTest.NetworkAgent.setMonitoringXHREnabled(false, callback);
}

Powered by Google App Engine
This is Rietveld 408576698