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

Side by Side Diff: device/bluetooth/test/mock_bluetooth_gatt_service.h

Issue 1149883011: bluetooth: Browser-side implementation of readValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-get-characteristic-initial
Patch Set: Fix merge conflicts Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_ 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_
6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_ 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // is only for convenience as far as testing is concerned, and it's possible 49 // is only for convenience as far as testing is concerned, and it's possible
50 // to write test cases without using these functions. 50 // to write test cases without using these functions.
51 // Example: 51 // Example:
52 // ON_CALL(*mock_service, GetCharacteristics)) 52 // ON_CALL(*mock_service, GetCharacteristics))
53 // .WillByDefault(Invoke( 53 // .WillByDefault(Invoke(
54 // *mock_service, 54 // *mock_service,
55 // &MockBluetoothGattService::GetMockCharacteristics)); 55 // &MockBluetoothGattService::GetMockCharacteristics));
56 void AddMockCharacteristic( 56 void AddMockCharacteristic(
57 scoped_ptr<MockBluetoothGattCharacteristic> mock_characteristic); 57 scoped_ptr<MockBluetoothGattCharacteristic> mock_characteristic);
58 std::vector<BluetoothGattCharacteristic*> GetMockCharacteristics() const; 58 std::vector<BluetoothGattCharacteristic*> GetMockCharacteristics() const;
59 BluetoothGattCharacteristic* GetMockCharacteristic(
60 const std::string& identifier) const;
59 61
60 private: 62 private:
61 ScopedVector<MockBluetoothGattCharacteristic> mock_characteristics_; 63 ScopedVector<MockBluetoothGattCharacteristic> mock_characteristics_;
62 64
63 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattService); 65 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattService);
64 }; 66 };
65 67
66 } // namespace device 68 } // namespace device
67 69
68 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_ 70 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698