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

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

Issue 1889253002: Remove uses of shell::Loader from content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5
6 /**
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.
9 */
10 var TEST_APP_URL = 'system:content_mojo_test';
11
12
13 define('main', [
14 'mojo/public/js/core',
15 'mojo/public/js/router',
16 'services/shell/public/interfaces/connector.mojom',
17 'content/public/renderer/frame_service_registry',
18 'content/public/test/test_mojo_service.mojom',
19 ], function (core, router, connectorMojom, serviceRegistry, testMojom) {
20
21 var connectToService = function(serviceProvider, iface) {
22 var pipe = core.createMessagePipe();
23 var service = new iface.proxyClass(new router.Router(pipe.handle0));
24 serviceProvider.getInterface(iface.name, pipe.handle1);
25 return service;
26 };
27
28 return function() {
29 domAutomationController.setAutomationId(0);
30 var connectorPipe =
31 serviceRegistry.connectToService(connectorMojom.Connector.name);
32 var connector = new connectorMojom.Connector.proxyClass(
33 new router.Router(connectorPipe));
34
35 var identity = {};
36 identity.name = TEST_APP_URL;
37 identity.user_id = connectorMojom.kInheritUserID;
38 identity.instance = "";
39 connector.connect(
40 identity,
41 function (services) {
42 var test = connectToService(services, testMojom.TestMojoService);
43 test.getRequestorName().then(function(response) {
44 domAutomationController.send(
45 response.name == 'chrome://mojo-web-ui/');
46 });
47 },
48 function (exposedServices) {},
49 null);
50 };
51 });
OLDNEW
« no previous file with comments | « content/test/data/web_ui_mojo_shell_test.html ('k') | content/utility/utility_process_control_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698