| Index: chrome/test/data/webui/settings/fake_bluetooth_private.js
|
| diff --git a/chrome/test/data/webui/settings/fake_bluetooth_private.js b/chrome/test/data/webui/settings/fake_bluetooth_private.js
|
| index 7b91b1d776e7238069cc3f3171036c3d88e7949e..7367da929730a82fec403aa3bdf3a767c6105b86 100644
|
| --- a/chrome/test/data/webui/settings/fake_bluetooth_private.js
|
| +++ b/chrome/test/data/webui/settings/fake_bluetooth_private.js
|
| @@ -14,18 +14,27 @@ cr.define('settings', function() {
|
| */
|
| function FakeBluetoothPrivate(bluetoothApi) {
|
| /** @private {!Bluetooth} */ this.bluetoothApi_ = bluetoothApi;
|
| +
|
| + /** @type {!Set<string>} */ this.connectedDevices_ = new Set();
|
| +
|
| + /** @type {!Object<!chrome.bluetoothPrivate.SetPairingResponseOptions>} */
|
| + this.pairingResponses_ = {};
|
| }
|
|
|
| FakeBluetoothPrivate.prototype = {
|
| /** @override */
|
| setAdapterState: function(state, opt_callback) {
|
| - this.bluetoothApi_.enabled = state.powered;
|
| + this.bluetoothApi_.adapterState = state;
|
| if (opt_callback)
|
| setTimeout(opt_callback);
|
| },
|
|
|
| /** @override */
|
| - setPairingResponse: assertNotReached,
|
| + setPairingResponse: function(options, opt_callback) {
|
| + this.pairingResponses_[options.device.address] = options;
|
| + if (opt_callback)
|
| + setTimeout(opt_callback);
|
| + },
|
|
|
| /** @override */
|
| disconnectAll: assertNotReached,
|
| @@ -37,7 +46,11 @@ cr.define('settings', function() {
|
| setDiscoveryFilter: assertNotReached,
|
|
|
| /** @override */
|
| - connect: assertNotReached,
|
| + connect: function(address, opt_callback) {
|
| + this.connectedDevices_.add(address);
|
| + if (opt_callback)
|
| + setTimeout(opt_callback);
|
| + },
|
|
|
| /** @override */
|
| pair: assertNotReached,
|
|
|