| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 GetEmptyAdapter(); | 118 GetEmptyAdapter(); |
| 119 | 119 |
| 120 // |GlucoseHeartRateAdapter| | 120 // |GlucoseHeartRateAdapter| |
| 121 // Inherits from |EmptyAdapter| | 121 // Inherits from |EmptyAdapter| |
| 122 // Devices added: | 122 // Devices added: |
| 123 // - |GlucoseDevice| | 123 // - |GlucoseDevice| |
| 124 // - |HeartRateDevice| | 124 // - |HeartRateDevice| |
| 125 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 125 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| 126 GetGlucoseHeartRateAdapter(); | 126 GetGlucoseHeartRateAdapter(); |
| 127 | 127 |
| 128 // |GetUnicodeDeviceAdapter| | |
| 129 // Inherits from |EmptyAdapter| | |
| 130 // Internal structure | |
| 131 // - UnicodeDevice | |
| 132 // - Mock Functions: | |
| 133 // - GetName(): Returns "❤❤❤❤❤❤❤❤❤" | |
| 134 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | |
| 135 GetUnicodeDeviceAdapter(); | |
| 136 | |
| 137 // |GetDeviceNameLongerThan29BytesAdapter| | |
| 138 // Inherits from |EmptyAdapter| | |
| 139 // Internal structure | |
| 140 // - DeviceNameLongerThan29Bytes | |
| 141 // - Mock Functions: | |
| 142 // - GetName(): Returns "a_device_name_that_is_longer_than_29_bytes_but_s
horter_than_248_bytes" | |
| 143 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | |
| 144 GetDeviceNameLongerThan29BytesAdapter(); | |
| 145 | |
| 146 // |SecondDiscoveryFindsHeartRateAdapter| | 128 // |SecondDiscoveryFindsHeartRateAdapter| |
| 147 // Inherits from |PoweredAdapter| | 129 // Inherits from |PoweredAdapter| |
| 148 // Mock Functions: | 130 // Mock Functions: |
| 149 // - StartDiscoverySessionWithFilter: | 131 // - StartDiscoverySessionWithFilter: |
| 150 // Run success callback with |DiscoverySession|. | 132 // Run success callback with |DiscoverySession|. |
| 151 // After the first call, adds a |HeartRateDevice|. | 133 // After the first call, adds a |HeartRateDevice|. |
| 152 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 134 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| 153 GetSecondDiscoveryFindsHeartRateAdapter(); | 135 GetSecondDiscoveryFindsHeartRateAdapter(); |
| 154 | 136 |
| 155 // |DeviceEventAdapter| | 137 // |DeviceEventAdapter| |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // - Generic Access UUID (0x1800) | 217 // - Generic Access UUID (0x1800) |
| 236 // - Heart Rate UUID (0x180d) | 218 // - Heart Rate UUID (0x180d) |
| 237 // - Services: | 219 // - Services: |
| 238 // - Generic Access Service - Characteristics as described in | 220 // - Generic Access Service - Characteristics as described in |
| 239 // GetGenericAccessService. | 221 // GetGenericAccessService. |
| 240 // - Heart Rate Service - Characteristics as described in | 222 // - Heart Rate Service - Characteristics as described in |
| 241 // GetHeartRateService. | 223 // GetHeartRateService. |
| 242 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 224 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| 243 GetHeartRateAdapter(); | 225 GetHeartRateAdapter(); |
| 244 | 226 |
| 245 // |GetEmptyNameDeviceAdapter| | |
| 246 // Inherits from |EmptyAdapter| | |
| 247 // Contains a single device with an empty name and no UUIDs. | |
| 248 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | |
| 249 GetEmptyNameDeviceAdapter(); | |
| 250 | |
| 251 // |GetNoNameDeviceAdapter| | 227 // |GetNoNameDeviceAdapter| |
| 252 // Inherits from |EmptyAdapter| | 228 // Inherits from |EmptyAdapter| |
| 253 // Contains a single device with no name and no UUIDs. | 229 // Contains a single device with no name and no UUIDs. |
| 254 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 230 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| 255 GetNoNameDeviceAdapter(); | 231 GetNoNameDeviceAdapter(); |
| 256 | 232 |
| 257 // |GetEmptyNameHeartRateAdapter| | 233 // |GetEmptyNameHeartRateAdapter| |
| 258 // Inherits from |EmptyAdapter| | 234 // Inherits from |EmptyAdapter| |
| 259 // Internal Structure: | 235 // Internal Structure: |
| 260 // - Heart Rate Device | 236 // - Heart Rate Device |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 | 819 |
| 844 // Function to turn an integer into an MAC address of the form | 820 // Function to turn an integer into an MAC address of the form |
| 845 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) | 821 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) |
| 846 // returns "00:00:DE:AD:BE:EF". | 822 // returns "00:00:DE:AD:BE:EF". |
| 847 static std::string makeMACAddress(uint64_t addr); | 823 static std::string makeMACAddress(uint64_t addr); |
| 848 }; | 824 }; |
| 849 | 825 |
| 850 } // namespace content | 826 } // namespace content |
| 851 | 827 |
| 852 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ | 828 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ |
| OLD | NEW |