| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 suite('Bluetooth', function() { | 5 suite('Bluetooth', function() { |
| 6 var bluetoothPage = null; | 6 var bluetoothPage = null; |
| 7 | 7 |
| 8 /** @type {Bluetooth} */ | 8 /** @type {Bluetooth} */ |
| 9 var bluetoothApi_; | 9 var bluetoothApi_; |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 }, | 31 }, |
| 32 { | 32 { |
| 33 address: '00:00:00:00:00:02', | 33 address: '00:00:00:00:00:02', |
| 34 name: 'FakeUnpairedDevice2', | 34 name: 'FakeUnpairedDevice2', |
| 35 paired: false, | 35 paired: false, |
| 36 }, | 36 }, |
| 37 ]; | 37 ]; |
| 38 | 38 |
| 39 suiteSetup(function() { | 39 suiteSetup(function() { |
| 40 loadTimeData.overrideValues({ | 40 loadTimeData.overrideValues({ |
| 41 bluetoothEnabled: 'bluetoothEnabled', | 41 deviceOff: 'deviceOff', |
| 42 bluetoothDisabled: 'bluetoothDisabled', | 42 deviceOn: 'deviceOn', |
| 43 bluetoothOn: 'bluetoothOn', | |
| 44 bluetoothOff: 'bluetoothOff', | |
| 45 bluetoothConnected: 'bluetoothConnected', | 43 bluetoothConnected: 'bluetoothConnected', |
| 46 bluetoothDisconnect: 'bluetoothDisconnect', | 44 bluetoothDisconnect: 'bluetoothDisconnect', |
| 47 bluetoothPair: 'bluetoothPair', | 45 bluetoothPair: 'bluetoothPair', |
| 48 bluetoothStartConnecting: 'bluetoothStartConnecting', | 46 bluetoothStartConnecting: 'bluetoothStartConnecting', |
| 49 }); | 47 }); |
| 50 | 48 |
| 51 bluetoothApi_ = new settings.FakeBluetooth(); | 49 bluetoothApi_ = new settings.FakeBluetooth(); |
| 52 bluetoothPrivateApi_ = new settings.FakeBluetoothPrivate(bluetoothApi_); | 50 bluetoothPrivateApi_ = new settings.FakeBluetoothPrivate(bluetoothApi_); |
| 53 | 51 |
| 54 // Set globals to override Settings Bluetooth Page apis. | 52 // Set globals to override Settings Bluetooth Page apis. |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 assertTrue(!!dialog); | 173 assertTrue(!!dialog); |
| 176 assertFalse(dialog.$.dialog.open); | 174 assertFalse(dialog.$.dialog.open); |
| 177 | 175 |
| 178 // Simulate selecting an unpaired device; should show the pair dialog. | 176 // Simulate selecting an unpaired device; should show the pair dialog. |
| 179 subpage.connectDevice_(subpage.unpairedDeviceList_[0]); | 177 subpage.connectDevice_(subpage.unpairedDeviceList_[0]); |
| 180 Polymer.dom.flush(); | 178 Polymer.dom.flush(); |
| 181 assertTrue(dialog.$.dialog.open); | 179 assertTrue(dialog.$.dialog.open); |
| 182 }); | 180 }); |
| 183 }); | 181 }); |
| 184 }); | 182 }); |
| OLD | NEW |