OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "device/bluetooth/test/mock_bluetooth_device.h" | 5 #include "device/bluetooth/test/mock_bluetooth_device.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 ON_CALL(*this, IsPaired()) | 44 ON_CALL(*this, IsPaired()) |
45 .WillByDefault(testing::Return(paired)); | 45 .WillByDefault(testing::Return(paired)); |
46 ON_CALL(*this, IsConnected()) | 46 ON_CALL(*this, IsConnected()) |
47 .WillByDefault(testing::Return(connected)); | 47 .WillByDefault(testing::Return(connected)); |
48 ON_CALL(*this, IsConnectable()) | 48 ON_CALL(*this, IsConnectable()) |
49 .WillByDefault(testing::Return(false)); | 49 .WillByDefault(testing::Return(false)); |
50 ON_CALL(*this, IsConnecting()) | 50 ON_CALL(*this, IsConnecting()) |
51 .WillByDefault(testing::Return(false)); | 51 .WillByDefault(testing::Return(false)); |
52 ON_CALL(*this, GetName()) | 52 ON_CALL(*this, GetName()) |
53 .WillByDefault(testing::Return(base::UTF8ToUTF16(name_))); | 53 .WillByDefault(testing::Return(base::UTF8ToUTF16(name_))); |
| 54 ON_CALL(*this, GetInquiryRSSI()) |
| 55 .WillByDefault(testing::Return(base::Optional<int8_t>(0))); |
| 56 ON_CALL(*this, GetInquiryTxPower()) |
| 57 .WillByDefault(testing::Return(base::Optional<int8_t>(0))); |
54 ON_CALL(*this, ExpectingPinCode()) | 58 ON_CALL(*this, ExpectingPinCode()) |
55 .WillByDefault(testing::Return(false)); | 59 .WillByDefault(testing::Return(false)); |
56 ON_CALL(*this, ExpectingPasskey()) | 60 ON_CALL(*this, ExpectingPasskey()) |
57 .WillByDefault(testing::Return(false)); | 61 .WillByDefault(testing::Return(false)); |
58 ON_CALL(*this, ExpectingConfirmation()) | 62 ON_CALL(*this, ExpectingConfirmation()) |
59 .WillByDefault(testing::Return(false)); | 63 .WillByDefault(testing::Return(false)); |
60 ON_CALL(*this, GetUUIDs()) | 64 ON_CALL(*this, GetUUIDs()) |
61 .WillByDefault(testing::Return(uuids_)); | 65 .WillByDefault(testing::Return(uuids_)); |
62 } | 66 } |
63 | 67 |
(...skipping 16 matching lines...) Expand all Loading... |
80 BluetoothRemoteGattService* MockBluetoothDevice::GetMockService( | 84 BluetoothRemoteGattService* MockBluetoothDevice::GetMockService( |
81 const std::string& identifier) const { | 85 const std::string& identifier) const { |
82 for (BluetoothRemoteGattService* service : mock_services_) { | 86 for (BluetoothRemoteGattService* service : mock_services_) { |
83 if (service->GetIdentifier() == identifier) | 87 if (service->GetIdentifier() == identifier) |
84 return service; | 88 return service; |
85 } | 89 } |
86 return nullptr; | 90 return nullptr; |
87 } | 91 } |
88 | 92 |
89 } // namespace device | 93 } // namespace device |
OLD | NEW |