Index: device/bluetooth/test/mock_bluetooth_device.cc |
diff --git a/device/bluetooth/test/mock_bluetooth_device.cc b/device/bluetooth/test/mock_bluetooth_device.cc |
index 6762e04a72892397c761cdbfac85927bb815aa01..61ab155fd5115849b7542349f6709cc36c87a6c7 100644 |
--- a/device/bluetooth/test/mock_bluetooth_device.cc |
+++ b/device/bluetooth/test/mock_bluetooth_device.cc |
@@ -10,23 +10,30 @@ |
namespace device { |
MockBluetoothDevice::MockBluetoothDevice(MockBluetoothAdapter* adapter, |
+ uint32 bluetooth_class, |
const std::string& name, |
const std::string& address, |
bool paired, |
- bool bonded, |
bool connected) |
- : name_(UTF8ToUTF16(name)), |
+ : bluetooth_class_(bluetooth_class), |
+ name_(name), |
address_(address) { |
- ON_CALL(*this, GetName()) |
+ ON_CALL(*this, GetBluetoothClass()) |
+ .WillByDefault(testing::Return(bluetooth_class_)); |
+ ON_CALL(*this, GetDeviceName()) |
.WillByDefault(testing::Return(name_)); |
- ON_CALL(*this, address()) |
- .WillByDefault(testing::ReturnRef(address_)); |
+ ON_CALL(*this, GetAddress()) |
+ .WillByDefault(testing::Return(address_)); |
ON_CALL(*this, IsPaired()) |
.WillByDefault(testing::Return(paired)); |
- ON_CALL(*this, IsBonded()) |
- .WillByDefault(testing::Return(bonded)); |
ON_CALL(*this, IsConnected()) |
.WillByDefault(testing::Return(connected)); |
+ ON_CALL(*this, IsConnectable()) |
+ .WillByDefault(testing::Return(false)); |
+ ON_CALL(*this, IsConnecting()) |
+ .WillByDefault(testing::Return(false)); |
+ ON_CALL(*this, GetName()) |
+ .WillByDefault(testing::Return(UTF8ToUTF16(name_))); |
ON_CALL(*this, ExpectingPinCode()) |
.WillByDefault(testing::Return(false)); |
ON_CALL(*this, ExpectingPasskey()) |
@@ -34,7 +41,7 @@ MockBluetoothDevice::MockBluetoothDevice(MockBluetoothAdapter* adapter, |
ON_CALL(*this, ExpectingConfirmation()) |
.WillByDefault(testing::Return(false)); |
ON_CALL(*this, GetServices()) |
- .WillByDefault(testing::ReturnRef(service_list_)); |
+ .WillByDefault(testing::Return(service_list_)); |
} |
MockBluetoothDevice::~MockBluetoothDevice() {} |