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

Side by Side Diff: device/bluetooth/test/bluetooth_test.h

Issue 2242833002: Bluetooth: mac: add connected BLE devices at startup Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Device: bluetooth: use untyped containers Created 4 years, 3 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // Initializes the BluetoothAdapter |adapter_| with the system adapter forced 98 // Initializes the BluetoothAdapter |adapter_| with the system adapter forced
99 // to be ignored as if it did not exist. This enables tests for when an 99 // to be ignored as if it did not exist. This enables tests for when an
100 // adapter is not present on the system. 100 // adapter is not present on the system.
101 virtual void InitWithoutDefaultAdapter() {} 101 virtual void InitWithoutDefaultAdapter() {}
102 102
103 // Initializes the BluetoothAdapter |adapter_| with a fake adapter that can be 103 // Initializes the BluetoothAdapter |adapter_| with a fake adapter that can be
104 // controlled by this test fixture. 104 // controlled by this test fixture.
105 virtual void InitWithFakeAdapter() {} 105 virtual void InitWithFakeAdapter() {}
106 106
107 // Initializes the BluetoothAdapter |adapter_| with a fake adapter that can be
108 // controlled by this test fixture. The adapter already contains a connected
109 // peripheral.
110 virtual void InitWithFakeAdapterWithConnectedLowEnergyDevice() {}
111
107 // Configures the fake adapter to lack the necessary permissions to scan for 112 // Configures the fake adapter to lack the necessary permissions to scan for
108 // devices. Returns false if the current platform always has permission. 113 // devices. Returns false if the current platform always has permission.
109 virtual bool DenyPermission(); 114 virtual bool DenyPermission();
110 115
111 // Create a fake Low Energy device and discover it. 116 // Create a fake Low Energy device and discover it.
112 // |device_ordinal| selects between multiple fake device data sets to produce: 117 // |device_ordinal| selects between multiple fake device data sets to produce:
113 // 1: Name: kTestDeviceName 118 // 1: Name: kTestDeviceName
114 // Address: kTestDeviceAddress1 119 // Address: kTestDeviceAddress1
115 // RSSI: kTestRSSI1 120 // RSSI: kTestRSSI1
116 // Advertised UUIDs: {kTestUUIDGenericAccess, kTestUUIDGenericAttribute} 121 // Advertised UUIDs: {kTestUUIDGenericAccess, kTestUUIDGenericAttribute}
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 int actual_error_callback_calls_ = 0; 487 int actual_error_callback_calls_ = 0;
483 bool unexpected_success_callback_ = false; 488 bool unexpected_success_callback_ = false;
484 bool unexpected_error_callback_ = false; 489 bool unexpected_error_callback_ = false;
485 490
486 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; 491 base::WeakPtrFactory<BluetoothTestBase> weak_factory_;
487 }; 492 };
488 493
489 } // namespace device 494 } // namespace device
490 495
491 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ 496 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.mm ('k') | device/bluetooth/test/bluetooth_test_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698