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

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

Issue 1132943002: bluetooth: Move mock creation out of BluetoothDispatcherHost to LayoutTestBluetoothAdapterProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-testing-layout-tests
Patch Set: Update documentation. Created 5 years, 7 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
Index: device/bluetooth/test/mock_bluetooth_adapter.cc
diff --git a/device/bluetooth/test/mock_bluetooth_adapter.cc b/device/bluetooth/test/mock_bluetooth_adapter.cc
index 4b47579fb1f4fa4eefb49b598f3636ffbc395498..11680013728ccef8d65351cef8252bb467afbb90 100644
--- a/device/bluetooth/test/mock_bluetooth_adapter.cc
+++ b/device/bluetooth/test/mock_bluetooth_adapter.cc
@@ -46,6 +46,20 @@ void MockBluetoothAdapter::StartDiscoverySessionWithFilter(
error_callback);
}
+void MockBluetoothAdapter::AddMockDevice(
+ scoped_ptr<MockBluetoothDevice> mock_device) {
+ mock_devices_.push_back(mock_device.Pass());
+}
+
+BluetoothAdapter::ConstDeviceList MockBluetoothAdapter::GetMockDevices() {
+ BluetoothAdapter::ConstDeviceList devices;
+ for (ScopedVector<MockBluetoothDevice>::iterator it = mock_devices_.begin();
+ it != mock_devices_.end(); ++it) {
+ devices.push_back(*it);
+ }
+ return devices;
+}
+
void MockBluetoothAdapter::RegisterAdvertisement(
scoped_ptr<BluetoothAdvertisement::Data> advertisement_data,
const CreateAdvertisementCallback& callback,
« content/test/layouttest_support.cc ('K') | « device/bluetooth/test/mock_bluetooth_adapter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698