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

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

Issue 256413003: chrome.bluetoothLowEnergy: Implement getService and getServices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 8 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_gatt_service.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_gatt_service.cc
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_service.cc b/device/bluetooth/test/mock_bluetooth_gatt_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..37392a66888e62873cdcd1555024a73a36ebf65e
--- /dev/null
+++ b/device/bluetooth/test/mock_bluetooth_gatt_service.cc
@@ -0,0 +1,36 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "device/bluetooth/test/mock_bluetooth_gatt_service.h"
+
+#include "device/bluetooth/test/mock_bluetooth_device.h"
+
+using testing::Return;
+using testing::_;
+
+namespace device {
+
+MockBluetoothGattService::MockBluetoothGattService(
+ MockBluetoothDevice* device,
+ const std::string& identifier,
+ const BluetoothUUID& uuid,
+ bool is_primary,
+ bool is_local) {
+ ON_CALL(*this, GetIdentifier()).WillByDefault(Return(identifier));
+ ON_CALL(*this, GetUUID()).WillByDefault(Return(uuid));
+ ON_CALL(*this, IsLocal()).WillByDefault(Return(is_local));
+ ON_CALL(*this, IsPrimary()).WillByDefault(Return(is_primary));
+ ON_CALL(*this, GetDevice()).WillByDefault(Return(device));
+ ON_CALL(*this, GetCharacteristics())
+ .WillByDefault(Return(std::vector<BluetoothGattCharacteristic*>()));
+ ON_CALL(*this, GetIncludedServices())
+ .WillByDefault(Return(std::vector<BluetoothGattService*>()));
+ ON_CALL(*this, GetCharacteristic(_))
+ .WillByDefault(Return(static_cast<BluetoothGattCharacteristic*>(NULL)));
+}
+
+MockBluetoothGattService::~MockBluetoothGattService() {
+}
+
+} // namespace device
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_gatt_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698