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

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

Issue 1991063002: Implement the gattserverdisconnected event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename-web-bluetooth-device
Patch Set: Skip the new tests on Mac, where getCharacteristic isn't implemented yet. Created 4 years, 7 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') | third_party/WebKit/LayoutTests/TestExpectations » ('j') | 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 8bbf442ea56f89cbf84db71f2a5a398e6ad1c573..ed7468b813075610c7e6f7e0750bf8f7ca1eaf56 100644
--- a/device/bluetooth/test/mock_bluetooth_device.cc
+++ b/device/bluetooth/test/mock_bluetooth_device.cc
@@ -22,7 +22,8 @@ MockBluetoothDevice::MockBluetoothDevice(MockBluetoothAdapter* adapter,
: BluetoothDevice(adapter),
bluetooth_class_(bluetooth_class),
name_(name),
- address_(address) {
+ address_(address),
+ connected_(connected) {
ON_CALL(*this, GetBluetoothClass())
.WillByDefault(testing::Return(bluetooth_class_));
ON_CALL(*this, GetDeviceName())
@@ -44,7 +45,7 @@ MockBluetoothDevice::MockBluetoothDevice(MockBluetoothAdapter* adapter,
ON_CALL(*this, IsPaired())
.WillByDefault(testing::Return(paired));
ON_CALL(*this, IsConnected())
- .WillByDefault(testing::Return(connected));
+ .WillByDefault(testing::ReturnPointee(&connected_));
ON_CALL(*this, IsConnectable())
.WillByDefault(testing::Return(false));
ON_CALL(*this, IsConnecting())
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_device.h ('k') | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698