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

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

Issue 2899163002: DevTools: Promisify Runtime domain (Closed)
Patch Set: addressing comments Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/extensions-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/extensions-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/extensions-test.js
index 6b3177169243bce1d6aa3302b4e550b9104eed7e..9e744db8f669c02afadf19808914ab749b46581a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/extensions-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/extensions-test.js
@@ -47,19 +47,18 @@ InspectorTest.showPanel = function(panelId)
return UI.inspectorView.showPanel(panelId);
}
-InspectorTest.runExtensionTests = function()
+InspectorTest.runExtensionTests = async function()
{
- InspectorTest.RuntimeAgent.evaluate("location.href", "console", false, function(error, result) {
- if (error)
- return;
- var pageURL = result.value;
- var extensionURL = (/^https?:/.test(pageURL) ?
- pageURL.replace(/^(https?:\/\/[^/]*\/).*$/,"$1") :
- pageURL.replace(/\/inspector\/extensions\/[^/]*$/, "/http/tests")) +
- "/inspector/resources/extension-main.html";
- InspectorFrontendAPI.addExtensions([{ startPage: extensionURL, name: "test extension", exposeWebInspectorNamespace: true }]);
- Extensions.extensionServer.initializeExtensions();
- });
+ var result = await InspectorTest.RuntimeAgent.evaluate("location.href", "console", false);
+ if (!result)
+ return;
+ var pageURL = result.value;
+ var extensionURL = (/^https?:/.test(pageURL) ?
+ pageURL.replace(/^(https?:\/\/[^/]*\/).*$/,"$1") :
+ pageURL.replace(/\/inspector\/extensions\/[^/]*$/, "/http/tests")) +
+ "/inspector/resources/extension-main.html";
+ InspectorFrontendAPI.addExtensions([{ startPage: extensionURL, name: "test extension", exposeWebInspectorNamespace: true }]);
+ Extensions.extensionServer.initializeExtensions();
}
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698