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

Unified Diff: device/bluetooth/test/bluetooth_test_win.cc

Issue 1681853003: Add BluetoothRemoteGattServiceWin to BluetoothDeviceWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add PlatformSupportsLowEnergy check in the unittests 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/test/bluetooth_test_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/bluetooth_test_win.cc
diff --git a/device/bluetooth/test/bluetooth_test_win.cc b/device/bluetooth/test/bluetooth_test_win.cc
index 2bbaeee60017f7daa5633286e47d530ca5a6123d..7a8f8f8ac51d184230bc8e715219b1be59bd5019 100644
--- a/device/bluetooth/test/bluetooth_test_win.cc
+++ b/device/bluetooth/test/bluetooth_test_win.cc
@@ -128,4 +128,30 @@ BluetoothDevice* BluetoothTestWin::DiscoverLowEnergyDevice(int device_ordinal) {
return nullptr;
}
+
+void BluetoothTestWin::SimulateGattConnection(BluetoothDevice* device) {
+ bluetooth_task_runner_->RunPendingTasks();
+ ui_task_runner_->RunPendingTasks();
+
+ // Clear records caused by CreateGattConnection since we do not support it on
+ // Windows.
+ gatt_discovery_attempts_++;
+ expected_success_callback_calls_--;
+ unexpected_error_callback_ = false;
+}
+
+void BluetoothTestWin::SimulateGattServicesDiscovered(
+ BluetoothDevice* device,
+ const std::vector<std::string>& uuids) {
+ win::BLEDevice* simulated_device =
+ fake_bt_le_wrapper_->GetSimulatedBLEDevice(device->GetAddress());
+ CHECK(simulated_device);
+
+ for (auto uuid : uuids) {
+ fake_bt_le_wrapper_->SimulateBLEGattService(simulated_device, uuid);
+ }
+
+ bluetooth_task_runner_->RunPendingTasks();
+ ui_task_runner_->RunPendingTasks();
+}
}
« no previous file with comments | « device/bluetooth/test/bluetooth_test_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698