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

Unified Diff: content/test/data/web_ui_mojo_shell_test.js

Issue 1728083002: Extract a Connector interface from Shell that can be cloned & passed to other threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@12uid
Patch Set: . Created 4 years, 10 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: content/test/data/web_ui_mojo_shell_test.js
diff --git a/content/test/data/web_ui_mojo_shell_test.js b/content/test/data/web_ui_mojo_shell_test.js
index 68f95ebf13959e56fb484daa3a9cdb8aa2d7c73b..9b6cfc4aa796663a972905eab85cf704d841e822 100644
--- a/content/test/data/web_ui_mojo_shell_test.js
+++ b/content/test/data/web_ui_mojo_shell_test.js
@@ -30,15 +30,18 @@ define('main', [
domAutomationController.setAutomationId(0);
var shellPipe = serviceRegistry.connectToService(shellMojom.Shell.name);
var shell = new shellMojom.Shell.proxyClass(new router.Router(shellPipe));
- shell.connect(TEST_APP_URL, 1,
- function (services) {
- var test = connectToService(services, testMojom.TestMojoService);
- test.getRequestorURL().then(function(response) {
- domAutomationController.send(
- response.url == 'chrome://mojo-web-ui/');
- });
- },
- function (exposedServices) {},
- new shellMojom.CapabilityFilter({ filter: new Map([["*", ["*"]]]) }));
+ shell.getConnector(function(connector) {
+ connector.connect(TEST_APP_URL, 1,
+ function (services) {
+ var test = connectToService(services, testMojom.TestMojoService);
+ test.getRequestorURL().then(function (response) {
+ domAutomationController.send(
+ response.url == 'chrome://mojo-web-ui/');
+ });
+ },
+ function (exposedServices) { },
+ new shellMojom.CapabilityFilter({ filter: new Map([["*", ["*"]]]) }));
+ });
+ });
};
});

Powered by Google App Engine
This is Rietveld 408576698