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

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

Issue 1690133002: Implement BluetoothRemoteGattServiceWin and related unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_WIN_H_ 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_
7 7
8 #include "device/bluetooth/test/bluetooth_test.h" 8 #include "device/bluetooth/test/bluetooth_test.h"
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 16 matching lines...) Expand all
27 void InitWithDefaultAdapter() override; 27 void InitWithDefaultAdapter() override;
28 void InitWithoutDefaultAdapter() override; 28 void InitWithoutDefaultAdapter() override;
29 void InitWithFakeAdapter() override; 29 void InitWithFakeAdapter() override;
30 bool DenyPermission() override; 30 bool DenyPermission() override;
31 void StartLowEnergyDiscoverySession() override; 31 void StartLowEnergyDiscoverySession() override;
32 BluetoothDevice* DiscoverLowEnergyDevice(int device_ordinal) override; 32 BluetoothDevice* DiscoverLowEnergyDevice(int device_ordinal) override;
33 void SimulateGattConnection(BluetoothDevice* device) override; 33 void SimulateGattConnection(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 SimulateGattServiceRemoved(BluetoothGattService* service) override;
38 void SimulateGattCharacteristic(BluetoothGattService* service,
39 const std::string& uuid,
40 int properties) override;
41 void SimulateGattCharacteristicRemove(
42 BluetoothGattService* service,
43 BluetoothGattCharacteristic* characteristic) override;
44 void SimulateIncludedGattServicesDiscovered(
45 BluetoothGattService* service,
46 const std::vector<std::string>& uuids) override;
37 47
38 private: 48 private:
39 scoped_refptr<base::TestSimpleTaskRunner> ui_task_runner_; 49 scoped_refptr<base::TestSimpleTaskRunner> ui_task_runner_;
40 scoped_refptr<base::TestSimpleTaskRunner> bluetooth_task_runner_; 50 scoped_refptr<base::TestSimpleTaskRunner> bluetooth_task_runner_;
41 BluetoothAdapterWin* adapter_win_; 51 BluetoothAdapterWin* adapter_win_;
42 52
43 win::BluetoothClassicWrapperFake* fake_bt_classic_wrapper_; 53 win::BluetoothClassicWrapperFake* fake_bt_classic_wrapper_;
44 win::BluetoothLowEnergyWrapperFake* fake_bt_le_wrapper_; 54 win::BluetoothLowEnergyWrapperFake* fake_bt_le_wrapper_;
45 55
46 void AdapterInitCallback(); 56 void AdapterInitCallback();
57 win::BLEGattService* GetSimulatedService(win::BLEDevice* device,
58 BluetoothGattService* service);
59 void ForceRefreshDevice();
47 }; 60 };
48 61
49 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). 62 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName).
50 typedef BluetoothTestWin BluetoothTest; 63 typedef BluetoothTestWin BluetoothTest;
51 64
52 } // namespace device 65 } // namespace device
53 66
54 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ 67 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698