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

Side by Side Diff: chrome/browser/resources/bluetooth_internals/interfaces.js

Issue 2428773005: bluetooth: Basic browser tests for chrome://bluetooth-internals. (Closed)
Patch Set: Fix formatting Created 4 years, 1 month 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * Javascript for Mojo interface helpers, served from 6 * Javascript for Mojo interface helpers, served from
7 * chrome://bluetooth-internals/. 7 * chrome://bluetooth-internals/.
8 */ 8 */
9 9
10 cr.define('interfaces', function() { 10 cr.define('interfaces', function() {
(...skipping 26 matching lines...) Expand all
37 if (!response.adapter) { 37 if (!response.adapter) {
38 throw new Error('Bluetooth Not Supported on this platform.'); 38 throw new Error('Bluetooth Not Supported on this platform.');
39 } 39 }
40 40
41 return interfaces.Connection.bindHandleToProxy( 41 return interfaces.Connection.bindHandleToProxy(
42 response.adapter, 42 response.adapter,
43 interfaces.BluetoothAdapter.Adapter); 43 interfaces.BluetoothAdapter.Adapter);
44 }); 44 });
45 } 45 }
46 46
47 /**
48 * Overriden by tests to give them a chance to setup a fake Mojo browser proxy
49 * before any other code executes.
50 * @return {!Promise} A promise firing once necessary setup has been completed.
51 */
52 var setupFn = window.setupFn || function() { return Promise.resolve(); };
53
54 function initialize() {
55 return setupFn().then(initializeProxies);
56 }
57
47 return { 58 return {
48 initialize: initializeProxies, 59 initialize: initialize,
49 }; 60 };
50 }); 61 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698