OLD | NEW |
---|---|
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 CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ | 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ |
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ | 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
325 // - Request Disconnection Service: - Characteristics as described in | 325 // - Request Disconnection Service: - Characteristics as described in |
326 // GetDisconnectingService | 326 // GetDisconnectingService |
327 // - Health Thermometer: | 327 // - Health Thermometer: |
328 // - Measurement Interval (0x2a21): | 328 // - Measurement Interval (0x2a21): |
329 // - Read: Calls GattCharacteristicValueChanged and success | 329 // - Read: Calls GattCharacteristicValueChanged and success |
330 // callback with [1]. | 330 // callback with [1]. |
331 // - Write: Calls success callback. | 331 // - Write: Calls success callback. |
332 // - StartNotifySession: Run success callback. | 332 // - StartNotifySession: Run success callback. |
333 // - GetProperties: Returns | 333 // - GetProperties: Returns |
334 // BluetoothRemoteGattCharacteristic::PROPERTY_READ | 334 // BluetoothRemoteGattCharacteristic::PROPERTY_READ |
335 // - Descriptors | |
336 // - user_description | |
ortuno
2016/12/07 08:05:12
nit: User Description (uuid here)
dougt
2016/12/07 19:48:57
Done.
| |
337 // Read calls success callback | |
ortuno
2016/12/07 08:05:12
nit: Read: Calls success callback.
dougt
2016/12/07 19:48:57
Removed. We aren't doing read or write in this cl
| |
338 // - client_characteristic_configuration | |
ortuno
2016/12/07 08:05:12
nit: Client Characteristic Configuration (uuid her
dougt
2016/12/07 19:48:57
Done.
| |
339 // Write calls success callback | |
ortuno
2016/12/07 08:05:12
nit: It should DCHECK since it's EXCLUDED WRITES.
dougt
2016/12/07 19:48:57
Turns out we don't do this anymore in this patch a
| |
340 // Note: This description must be blocklist. | |
341 // - bad0 | |
ortuno
2016/12/07 08:05:12
nit: Use 128bit UUIDs.
dougt
2016/12/07 19:48:57
Done.
| |
342 // A test descriptor that does is blocklisted. | |
343 | |
335 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 344 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
336 GetDisconnectingHealthThermometer(); | 345 GetDisconnectingHealthThermometer(); |
337 | 346 |
338 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect) | 347 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect) |
339 // Inherits from |HeartRateAdapter| | 348 // Inherits from |HeartRateAdapter| |
340 // Internal Structure: | 349 // Internal Structure: |
341 // - Heart Rate Device | 350 // - Heart Rate Device |
342 // - UUIDs: | 351 // - UUIDs: |
343 // - Generic Access UUID (0x1800) | 352 // - Generic Access UUID (0x1800) |
344 // - Heart Rate UUID (0x180d) | 353 // - Heart Rate UUID (0x180d) |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
832 | 841 |
833 // Returns a stable test data UUID associated with a given | 842 // Returns a stable test data UUID associated with a given |
834 // BluetoothDevice::ConnectErrorCode. | 843 // BluetoothDevice::ConnectErrorCode. |
835 static device::BluetoothUUID connectErrorUUID( | 844 static device::BluetoothUUID connectErrorUUID( |
836 device::BluetoothDevice::ConnectErrorCode error_code); | 845 device::BluetoothDevice::ConnectErrorCode error_code); |
837 | 846 |
838 // Function to turn an integer into an MAC address of the form | 847 // Function to turn an integer into an MAC address of the form |
839 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) | 848 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) |
840 // returns "00:00:DE:AD:BE:EF". | 849 // returns "00:00:DE:AD:BE:EF". |
841 static std::string makeMACAddress(uint64_t addr); | 850 static std::string makeMACAddress(uint64_t addr); |
851 | |
852 // Adds the following descriptors to the characteristic: | |
853 // - user_description | |
854 // Read calls success callback | |
855 // - client_characteristic_configuration | |
856 // Write calls success callback | |
857 // Note: This description must be blocklisted. | |
858 // - bad0 | |
859 // Test descriptor that is blocklisted. | |
860 static void AddDescriptorsToCharacteristic( | |
861 device::MockBluetoothGattCharacteristic* characteristic); | |
842 }; | 862 }; |
843 | 863 |
844 } // namespace content | 864 } // namespace content |
845 | 865 |
846 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_ | 866 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_ |
OLD | NEW |