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

Side by Side Diff: content/test/data/web_ui_mojo_shell_test.js

Issue 1736663003: Eliminate Quit() from Shell, and roll Shell & Connector together. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@14cf
Patch Set: . Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | mojo/shell/application_instance.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 /** 6 /**
7 * This URL is defined in content/public/test/test_mojo_app.cc. It identifies 7 * This URL is defined in content/public/test/test_mojo_app.cc. It identifies
8 * content_shell's out-of-process Mojo test app. 8 * content_shell's out-of-process Mojo test app.
9 */ 9 */
10 var TEST_APP_URL = 'system:content_mojo_test'; 10 var TEST_APP_URL = 'system:content_mojo_test';
(...skipping 10 matching lines...) Expand all
21 21
22 var connectToService = function(serviceProvider, iface) { 22 var connectToService = function(serviceProvider, iface) {
23 var pipe = core.createMessagePipe(); 23 var pipe = core.createMessagePipe();
24 var service = new iface.proxyClass(new router.Router(pipe.handle0)); 24 var service = new iface.proxyClass(new router.Router(pipe.handle0));
25 serviceProvider.getInterface(iface.name, pipe.handle1); 25 serviceProvider.getInterface(iface.name, pipe.handle1);
26 return service; 26 return service;
27 }; 27 };
28 28
29 return function() { 29 return function() {
30 domAutomationController.setAutomationId(0); 30 domAutomationController.setAutomationId(0);
31 var shellPipe = serviceRegistry.connectToService(shellMojom.Shell.name); 31 var connectorPipe =
32 var shell = new shellMojom.Shell.proxyClass(new router.Router(shellPipe)); 32 serviceRegistry.connectToService(shellMojom.Connector.name);
33 33 var connector = new shellMojom.Connector.proxyClass(
34 var pipe = core.createMessagePipe(); 34 new router.Router(connectorPipe));
35 var connector =
36 new shellMojom.Connector.proxyClass(new router.Router(pipe.handle0));
37 shell.getConnector(pipe.handle1);
38 35
39 connector.connect( 36 connector.connect(
40 TEST_APP_URL, 1, 37 TEST_APP_URL, 1,
41 function (services) { 38 function (services) {
42 var test = connectToService(services, testMojom.TestMojoService); 39 var test = connectToService(services, testMojom.TestMojoService);
43 test.getRequestorURL().then(function(response) { 40 test.getRequestorURL().then(function(response) {
44 domAutomationController.send( 41 domAutomationController.send(
45 response.url == 'chrome://mojo-web-ui/'); 42 response.url == 'chrome://mojo-web-ui/');
46 }); 43 });
47 }, 44 },
48 function (exposedServices) {}); 45 function (exposedServices) {});
49 }; 46 };
50 }); 47 });
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | mojo/shell/application_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698