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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // |EmptyAdapter| | 110 // |EmptyAdapter| |
111 // Inherits from |PoweredAdapter| | 111 // Inherits from |PoweredAdapter| |
112 // Devices Added: | 112 // Devices Added: |
113 // None. | 113 // None. |
114 // Mock Functions: | 114 // Mock Functions: |
115 // - StartDiscoverySessionWithFilter: | 115 // - StartDiscoverySessionWithFilter: |
116 // Run success callback with |DiscoverySession|. | 116 // Run success callback with |DiscoverySession|. |
117 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 117 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
118 GetEmptyAdapter(); | 118 GetEmptyAdapter(); |
119 | 119 |
120 // |PowerValueAdapter|(tx_power, rssi) | |
121 // Inherits from |EmptyAdapter| | |
122 // Internal Structure: | |
123 // - |HeartRateDevice| | |
124 // - Mock Functions: | |
125 // - GetInquiryTxPower(): Returns tx_power | |
126 // - GetInquiryRSSI(): Returns rssi | |
127 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | |
128 GetPowerValueAdapter(int8_t tx_power, int8_t rssi); | |
129 | |
130 // |PowerPresenceAdapter|(tx_power_present, rssi_present) | |
131 // Inherits from |EmptyAdapter| | |
132 // Internal Structure: | |
133 // - |HeartRateDevice| | |
134 // - Mock Functions: | |
135 // - GetInquiryTxPower(): If tx_power_present is true, returns -10, | |
136 // the TxPower of a device broadcasting at 0.1mW. Otherwise | |
137 // returns 127 which denotes a missing Tx Power. | |
138 // TODO(ortuno): Change 127 to -128 when Tx Power Unknown value gets | |
139 // fixed: http://crbug.com/551572 | |
140 // - GetInquiryRSSI(): If rssi_present is true returns -51, | |
141 // the RSSI at 1m from a device broadcasting at 0.1mW. Otherwise | |
142 // returns 127 which denotes a missing RSSI. | |
143 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | |
144 GetPowerPresenceAdapter(bool tx_power_present, bool rssi_present); | |
145 | |
146 // |GlucoseHeartRateAdapter| | 120 // |GlucoseHeartRateAdapter| |
147 // Inherits from |EmptyAdapter| | 121 // Inherits from |EmptyAdapter| |
148 // Devices added: | 122 // Devices added: |
149 // - |GlucoseDevice| | 123 // - |GlucoseDevice| |
150 // - |HeartRateDevice| | 124 // - |HeartRateDevice| |
151 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 125 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
152 GetGlucoseHeartRateAdapter(); | 126 GetGlucoseHeartRateAdapter(); |
153 | 127 |
154 // |GetUnicodeDeviceAdapter| | 128 // |GetUnicodeDeviceAdapter| |
155 // Inherits from |EmptyAdapter| | 129 // Inherits from |EmptyAdapter| |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 | 584 |
611 // Function to turn an integer into an MAC address of the form | 585 // Function to turn an integer into an MAC address of the form |
612 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) | 586 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) |
613 // returns "00:00:DE:AD:BE:EF". | 587 // returns "00:00:DE:AD:BE:EF". |
614 static std::string makeMACAddress(uint64_t addr); | 588 static std::string makeMACAddress(uint64_t addr); |
615 }; | 589 }; |
616 | 590 |
617 } // namespace content | 591 } // namespace content |
618 | 592 |
619 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ | 593 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ |
OLD | NEW |