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

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

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/network-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/network-test.js
index 3025527b756147b752d3a71141186b69baf84e5a..92d9867eab1655a6bd211c6e4b144b8e2913222c 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/network-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network-test.js
@@ -43,9 +43,9 @@ function makeXHRForJSONArguments(jsonArgs)
makeXHR(args.method, args.url, args.async, args.user, args.password, args.headers || [], args.withCredentials, args.payload, args.type, xhrLoadedCallback);
}
-function makeFetch(url, requestInitializer, callback)
+function makeFetch(url, requestInitializer)
{
- fetch(url, requestInitializer).then(callback).catch(callback);
+ return fetch(url, requestInitializer).catch(e => e);
}
var initialize_NetworkTest = function() {
@@ -117,7 +117,7 @@ InspectorTest.makeXHR = function(method, url, async, user, password, headers, wi
InspectorTest.makeFetch = function(url, requestInitializer, callback)
{
- InspectorTest.invokePageFunctionAsync("makeFetch", url, requestInitializer, callback);
+ InspectorTest.callFunctionInPageAsync("makeFetch", [url, requestInitializer]).then(callback);
}
InspectorTest.HARPropertyFormatters = {

Powered by Google App Engine
This is Rietveld 408576698