Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1587)

Unified Diff: device/bluetooth/test/mock_bluetooth_device.cc

Issue 13416005: Bluetooth: clean up BluetoothDevice (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More win visible fixes Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_device.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {}
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_device.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698