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

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

Issue 1422463012: bluetooth: android: Implement StartNotifySession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed ortuno Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BLUETOOTH_TEST_ANDROID_H_ 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_ 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "device/bluetooth/test/bluetooth_test.h" 9 #include "device/bluetooth/test/bluetooth_test.h"
10 10
(...skipping 20 matching lines...) Expand all
31 void SimulateGattConnectionError(BluetoothDevice* device, 31 void SimulateGattConnectionError(BluetoothDevice* device,
32 BluetoothDevice::ConnectErrorCode) override; 32 BluetoothDevice::ConnectErrorCode) override;
33 void SimulateGattDisconnection(BluetoothDevice* device) override; 33 void SimulateGattDisconnection(BluetoothDevice* device) override;
34 void SimulateGattServicesDiscovered( 34 void SimulateGattServicesDiscovered(
35 BluetoothDevice* device, 35 BluetoothDevice* device,
36 const std::vector<std::string>& uuids) override; 36 const std::vector<std::string>& uuids) override;
37 void SimulateGattServicesDiscoveryError(BluetoothDevice* device) override; 37 void SimulateGattServicesDiscoveryError(BluetoothDevice* device) override;
38 void SimulateGattCharacteristic(BluetoothGattService* service, 38 void SimulateGattCharacteristic(BluetoothGattService* service,
39 const std::string& uuid, 39 const std::string& uuid,
40 int properties) override; 40 int properties) override;
41 virtual void SimulateGattNotifySessionStarted(
42 BluetoothGattCharacteristic* characteristic) override;
43 virtual void SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce(
44 BluetoothGattCharacteristic* characteristic) override;
41 void SimulateGattCharacteristicRead( 45 void SimulateGattCharacteristicRead(
42 BluetoothGattCharacteristic* characteristic, 46 BluetoothGattCharacteristic* characteristic,
43 const std::vector<uint8>& value) override; 47 const std::vector<uint8>& value) override;
44 void SimulateGattCharacteristicReadError( 48 void SimulateGattCharacteristicReadError(
45 BluetoothGattCharacteristic* characteristic, 49 BluetoothGattCharacteristic* characteristic,
46 BluetoothGattService::GattErrorCode) override; 50 BluetoothGattService::GattErrorCode) override;
47 void SimulateGattCharacteristicReadWillFailSynchronouslyOnce( 51 void SimulateGattCharacteristicReadWillFailSynchronouslyOnce(
48 BluetoothGattCharacteristic* characteristic) override; 52 BluetoothGattCharacteristic* characteristic) override;
49 void SimulateGattCharacteristicWrite( 53 void SimulateGattCharacteristicWrite(
50 BluetoothGattCharacteristic* characteristic) override; 54 BluetoothGattCharacteristic* characteristic) override;
51 void SimulateGattCharacteristicWriteError( 55 void SimulateGattCharacteristicWriteError(
52 BluetoothGattCharacteristic* characteristic, 56 BluetoothGattCharacteristic* characteristic,
53 BluetoothGattService::GattErrorCode) override; 57 BluetoothGattService::GattErrorCode) override;
54 void SimulateGattCharacteristicWriteWillFailSynchronouslyOnce( 58 void SimulateGattCharacteristicWriteWillFailSynchronouslyOnce(
55 BluetoothGattCharacteristic* characteristic) override; 59 BluetoothGattCharacteristic* characteristic) override;
56 60
57 // Records that Java FakeBluetoothDevice connectGatt was called. 61 // Records that Java FakeBluetoothDevice connectGatt was called.
58 void OnFakeBluetoothDeviceConnectGattCalled(JNIEnv* env, jobject caller); 62 void OnFakeBluetoothDeviceConnectGattCalled(JNIEnv* env, jobject caller);
59 63
60 // Records that Java FakeBluetoothGatt disconnect was called. 64 // Records that Java FakeBluetoothGatt disconnect was called.
61 void OnFakeBluetoothGattDisconnect(JNIEnv* env, jobject caller); 65 void OnFakeBluetoothGattDisconnect(JNIEnv* env, jobject caller);
62 66
63 // Records that Java FakeBluetoothGatt discoverServices was called. 67 // Records that Java FakeBluetoothGatt discoverServices was called.
64 void OnFakeBluetoothGattDiscoverServices(JNIEnv* env, jobject caller); 68 void OnFakeBluetoothGattDiscoverServices(JNIEnv* env, jobject caller);
65 69
66 // Records that Java FakeBluetoothGatt discoverServices was called. 70 // Records that Java FakeBluetoothGatt setCharacteristicNotification was
71 // called.
72 void OnFakeBluetoothGattSetCharacteristicNotification(JNIEnv* env,
73 jobject caller);
74
75 // Records that Java FakeBluetoothGatt readCharacteristic was called.
67 void OnFakeBluetoothGattReadCharacteristic(JNIEnv* env, jobject caller); 76 void OnFakeBluetoothGattReadCharacteristic(JNIEnv* env, jobject caller);
68 77
69 // Records that Java FakeBluetoothGatt discoverServices was called. 78 // Records that Java FakeBluetoothGatt writeCharacteristic was called.
70 void OnFakeBluetoothGattWriteCharacteristic(JNIEnv* env, 79 void OnFakeBluetoothGattWriteCharacteristic(JNIEnv* env,
71 jobject caller, 80 jobject caller,
72 jbyteArray value); 81 jbyteArray value);
73 82
74 base::android::ScopedJavaGlobalRef<jobject> j_fake_bluetooth_adapter_; 83 base::android::ScopedJavaGlobalRef<jobject> j_fake_bluetooth_adapter_;
75 }; 84 };
76 85
77 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). 86 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName).
78 typedef BluetoothTestAndroid BluetoothTest; 87 typedef BluetoothTestAndroid BluetoothTest;
79 88
80 } // namespace device 89 } // namespace device
81 90
82 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_ 91 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_
OLDNEW
« no previous file with comments | « device/bluetooth/test/bluetooth_test.cc ('k') | device/bluetooth/test/bluetooth_test_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698