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

Unified Diff: device/bluetooth/test/mock_bluetooth_gatt_characteristic.h

Issue 255053002: chrome.bluetoothLowEnergy: Implement getCharacteristics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/bluetooth.gyp ('k') | device/bluetooth/test/mock_bluetooth_gatt_characteristic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
new file mode 100644
index 0000000000000000000000000000000000000000..66195437f6e09077341dceda93b80d2801b86f81
--- /dev/null
+++ b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
@@ -0,0 +1,55 @@
+// 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.
+
+#ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_
+#define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/callback.h"
+#include "device/bluetooth/bluetooth_gatt_characteristic.h"
+#include "device/bluetooth/bluetooth_uuid.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace device {
+
+class BluetoothGattDescriptor;
+class BluetoothGattService;
+class MockBluetoothGattService;
+
+class MockBluetoothGattCharacteristic : public BluetoothGattCharacteristic {
+ public:
+ MockBluetoothGattCharacteristic(MockBluetoothGattService* service,
+ const std::string& identifier,
+ const BluetoothUUID& uuid,
+ bool is_local,
+ Properties properties,
+ Permissions permissions);
+ virtual ~MockBluetoothGattCharacteristic();
+
+ MOCK_CONST_METHOD0(GetIdentifier, std::string());
+ MOCK_CONST_METHOD0(GetUUID, BluetoothUUID());
+ MOCK_CONST_METHOD0(IsLocal, bool());
+ MOCK_CONST_METHOD0(GetValue, const std::vector<uint8>&());
+ MOCK_CONST_METHOD0(GetService, BluetoothGattService*());
+ MOCK_CONST_METHOD0(GetProperties, Properties());
+ MOCK_CONST_METHOD0(GetPermissions, Permissions());
+ MOCK_CONST_METHOD0(GetDescriptors, std::vector<BluetoothGattDescriptor*>());
+ MOCK_METHOD1(AddDescriptor, bool(BluetoothGattDescriptor*));
+ MOCK_METHOD1(UpdateValue, bool(const std::vector<uint8>&));
+ MOCK_METHOD2(ReadRemoteCharacteristic,
+ void(const ValueCallback&, const ErrorCallback&));
+ MOCK_METHOD3(WriteRemoteCharacteristic,
+ void(const std::vector<uint8>&,
+ const base::Closure&,
+ const ErrorCallback&));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic);
+};
+
+} // namespace device
+
+#endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_
« no previous file with comments | « device/bluetooth/bluetooth.gyp ('k') | device/bluetooth/test/mock_bluetooth_gatt_characteristic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698