| OLD | NEW |
| 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 18 matching lines...) Expand all Loading... |
| 29 BluetoothDevice* DiscoverLowEnergyDevice(int device_ordinal) override; | 29 BluetoothDevice* DiscoverLowEnergyDevice(int device_ordinal) override; |
| 30 void SimulateGattConnection(BluetoothDevice* device) override; | 30 void SimulateGattConnection(BluetoothDevice* device) override; |
| 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) override; | 39 const std::string& uuid, |
| 40 int properties) override; |
| 40 | 41 |
| 41 // Records that Java FakeBluetoothDevice connectGatt was called. | 42 // Records that Java FakeBluetoothDevice connectGatt was called. |
| 42 void OnFakeBluetoothDeviceConnectGattCalled(JNIEnv* env, jobject caller); | 43 void OnFakeBluetoothDeviceConnectGattCalled(JNIEnv* env, jobject caller); |
| 43 | 44 |
| 44 // Records that Java FakeBluetoothGatt disconnect was called. | 45 // Records that Java FakeBluetoothGatt disconnect was called. |
| 45 void OnFakeBluetoothGattDisconnect(JNIEnv* env, jobject caller); | 46 void OnFakeBluetoothGattDisconnect(JNIEnv* env, jobject caller); |
| 46 | 47 |
| 47 // Records that Java FakeBluetoothGatt discoverServices was called. | 48 // Records that Java FakeBluetoothGatt discoverServices was called. |
| 48 void OnFakeBluetoothGattDiscoverServices(JNIEnv* env, jobject caller); | 49 void OnFakeBluetoothGattDiscoverServices(JNIEnv* env, jobject caller); |
| 49 | 50 |
| 50 base::android::ScopedJavaGlobalRef<jobject> j_fake_bluetooth_adapter_; | 51 base::android::ScopedJavaGlobalRef<jobject> j_fake_bluetooth_adapter_; |
| 51 }; | 52 }; |
| 52 | 53 |
| 53 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). | 54 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). |
| 54 typedef BluetoothTestAndroid BluetoothTest; | 55 typedef BluetoothTestAndroid BluetoothTest; |
| 55 | 56 |
| 56 } // namespace device | 57 } // namespace device |
| 57 | 58 |
| 58 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_ | 59 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_ |
| OLD | NEW |