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

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

Issue 1827473002: Make the process-wide ServiceRegistry available to JS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/test/data/web_ui_mojo.js ('k') | extensions/renderer/api_test_base.cc » ('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';
11 11
12 12
13 define('main', [ 13 define('main', [
14 'mojo/public/js/core', 14 'mojo/public/js/core',
15 'mojo/public/js/router', 15 'mojo/public/js/router',
16 'mojo/services/network/public/interfaces/url_loader.mojom', 16 'mojo/services/network/public/interfaces/url_loader.mojom',
17 'mojo/shell/public/interfaces/connector.mojom', 17 'mojo/shell/public/interfaces/connector.mojom',
18 'content/public/renderer/service_provider', 18 'content/public/renderer/frame_service_registry',
19 'content/public/test/test_mojo_service.mojom', 19 'content/public/test/test_mojo_service.mojom',
20 ], function (core, router, urlMojom, connectorMojom, serviceRegistry, 20 ], function (core, router, urlMojom, connectorMojom, serviceRegistry,
21 testMojom) { 21 testMojom) {
22 22
23 var connectToService = function(serviceProvider, iface) { 23 var connectToService = function(serviceProvider, iface) {
24 var pipe = core.createMessagePipe(); 24 var pipe = core.createMessagePipe();
25 var service = new iface.proxyClass(new router.Router(pipe.handle0)); 25 var service = new iface.proxyClass(new router.Router(pipe.handle0));
26 serviceProvider.getInterface(iface.name, pipe.handle1); 26 serviceProvider.getInterface(iface.name, pipe.handle1);
27 return service; 27 return service;
28 }; 28 };
(...skipping 15 matching lines...) Expand all
44 var test = connectToService(services, testMojom.TestMojoService); 44 var test = connectToService(services, testMojom.TestMojoService);
45 test.getRequestorName().then(function(response) { 45 test.getRequestorName().then(function(response) {
46 domAutomationController.send( 46 domAutomationController.send(
47 response.name == 'chrome://mojo-web-ui/'); 47 response.name == 'chrome://mojo-web-ui/');
48 }); 48 });
49 }, 49 },
50 function (exposedServices) {}, 50 function (exposedServices) {},
51 null); 51 null);
52 }; 52 };
53 }); 53 });
OLDNEW
« no previous file with comments | « content/test/data/web_ui_mojo.js ('k') | extensions/renderer/api_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698