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

Side by Side Diff: chrome/test/data/webui/settings/fake_bluetooth_private.js

Issue 1466433002: Add Settings bluetooth page test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chrome OS only Take 2 Created 4 years, 12 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 | « chrome/test/data/webui/settings/fake_bluetooth.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * @fileoverview Fake implementation of chrome.bluetoothPrivate for testing.
7 */
8 cr.define('settings', function() {
9 /**
10 * Fake of the chrome.bluetooth API.
11 * @param {!Bluetooth} bluetoothApi
12 * @constructor
13 * @implements {BluetoothPrivate}
14 */
15 function FakeBluetoothPrivate(bluetoothApi) {
16 /** @private {!Bluetooth} */ this.bluetoothApi_ = bluetoothApi;
17 }
18
19 FakeBluetoothPrivate.prototype = {
20 /** @override */
21 setAdapterState: function(state, opt_callback) {
22 this.bluetoothApi_.enabled = state.powered;
23 if (opt_callback)
24 setTimeout(opt_callback);
25 },
26
27 /** @override */
28 setPairingResponse: assertNotReached,
29
30 /** @override */
31 disconnectAll: assertNotReached,
32
33 /** @override */
34 forgetDevice: assertNotReached,
35
36 /** @override */
37 setDiscoveryFilter: assertNotReached,
38
39 /** @override */
40 connect: assertNotReached,
41
42 /** @override */
43 pair: assertNotReached,
44
45 /** @type {!FakeChromeEvent} */
46 onPairing: new FakeChromeEvent(),
47 };
48
49 return {FakeBluetoothPrivate: FakeBluetoothPrivate};
50 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/fake_bluetooth.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698