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

Side by Side Diff: device/bluetooth/bluetooth_adapter_unittest.cc

Issue 2861533004: Implement chrome.bluetoothLowEnergy.resetAdvertising(). (Closed)
Patch Set: Implement chrome.bluetoothLowEnergy.resetAllAdvertisements(). Created 3 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "device/bluetooth/bluetooth_adapter.h" 5 #include "device/bluetooth/bluetooth_adapter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 std::unique_ptr<BluetoothAdvertisement::Data> advertisement_data, 99 std::unique_ptr<BluetoothAdvertisement::Data> advertisement_data,
100 const CreateAdvertisementCallback& callback, 100 const CreateAdvertisementCallback& callback,
101 const AdvertisementErrorCallback& error_callback) override {} 101 const AdvertisementErrorCallback& error_callback) override {}
102 102
103 #if defined(OS_CHROMEOS) || defined(OS_LINUX) 103 #if defined(OS_CHROMEOS) || defined(OS_LINUX)
104 void SetAdvertisingInterval( 104 void SetAdvertisingInterval(
105 const base::TimeDelta& min, 105 const base::TimeDelta& min,
106 const base::TimeDelta& max, 106 const base::TimeDelta& max,
107 const base::Closure& callback, 107 const base::Closure& callback,
108 const AdvertisementErrorCallback& error_callback) override {} 108 const AdvertisementErrorCallback& error_callback) override {}
109 void ResetAdvertising(
110 const base::Closure& callback,
111 const AdvertisementErrorCallback& error_callback) override {}
109 #endif 112 #endif
110 113
111 BluetoothLocalGattService* GetGattService( 114 BluetoothLocalGattService* GetGattService(
112 const std::string& identifier) const override { 115 const std::string& identifier) const override {
113 return nullptr; 116 return nullptr;
114 } 117 }
115 118
116 void TestErrorCallback() {} 119 void TestErrorCallback() {}
117 120
118 std::vector<std::unique_ptr<BluetoothDiscoverySession>> discovery_sessions_; 121 std::vector<std::unique_ptr<BluetoothDiscoverySession>> discovery_sessions_;
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 } 1087 }
1085 EXPECT_EQ(BluetoothDevice::UUIDSet({heart_service_uuid}), 1088 EXPECT_EQ(BluetoothDevice::UUIDSet({heart_service_uuid}),
1086 RetrieveConnectedPeripheralServiceUUIDs()); 1089 RetrieveConnectedPeripheralServiceUUIDs());
1087 1090
1088 EXPECT_EQ(0, observer.device_added_count()); 1091 EXPECT_EQ(0, observer.device_added_count());
1089 EXPECT_EQ(1u, adapter_->GetDevices().size()); 1092 EXPECT_EQ(1u, adapter_->GetDevices().size());
1090 } 1093 }
1091 #endif // defined(OS_MACOSX) 1094 #endif // defined(OS_MACOSX)
1092 1095
1093 } // namespace device 1096 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698