OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "device/bluetooth/bluetooth_adapter.h" | 7 #include "device/bluetooth/bluetooth_adapter.h" |
8 #include "device/bluetooth/bluetooth_device.h" | 8 #include "device/bluetooth/bluetooth_device.h" |
9 #include "device/bluetooth/bluetooth_discovery_session.h" | 9 #include "device/bluetooth/bluetooth_discovery_session.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 const BluetoothUUID& uuid, | 70 const BluetoothUUID& uuid, |
71 const ServiceOptions& options, | 71 const ServiceOptions& options, |
72 const CreateServiceCallback& callback, | 72 const CreateServiceCallback& callback, |
73 const CreateServiceErrorCallback& error_callback) override {} | 73 const CreateServiceErrorCallback& error_callback) override {} |
74 | 74 |
75 void RegisterAudioSink( | 75 void RegisterAudioSink( |
76 const BluetoothAudioSink::Options& options, | 76 const BluetoothAudioSink::Options& options, |
77 const AcquiredCallback& callback, | 77 const AcquiredCallback& callback, |
78 const BluetoothAudioSink::ErrorCallback& error_callback) override {} | 78 const BluetoothAudioSink::ErrorCallback& error_callback) override {} |
79 | 79 |
| 80 void RegisterAdvertisement( |
| 81 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, |
| 82 const CreateAdvertisementCallback& callback, |
| 83 const CreateAdvertisementErrorCallback& error_callback) override {} |
| 84 |
80 void TestErrorCallback() {} | 85 void TestErrorCallback() {} |
81 | 86 |
82 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; | 87 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; |
83 | 88 |
84 void TestOnStartDiscoverySession( | 89 void TestOnStartDiscoverySession( |
85 scoped_ptr<device::BluetoothDiscoverySession> discovery_session) { | 90 scoped_ptr<device::BluetoothDiscoverySession> discovery_session) { |
86 discovery_sessions_.push_back(discovery_session.Pass()); | 91 discovery_sessions_.push_back(discovery_session.Pass()); |
87 } | 92 } |
88 | 93 |
89 void CleanupSessions() { discovery_sessions_.clear(); } | 94 void CleanupSessions() { discovery_sessions_.clear(); } |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 resulting_uuids.end()); | 394 resulting_uuids.end()); |
390 | 395 |
391 resulting_filter = adapter->GetMergedDiscoveryFilterMasked(df); | 396 resulting_filter = adapter->GetMergedDiscoveryFilterMasked(df); |
392 EXPECT_EQ(BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL, | 397 EXPECT_EQ(BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL, |
393 resulting_filter->GetTransport()); | 398 resulting_filter->GetTransport()); |
394 | 399 |
395 adapter->CleanupSessions(); | 400 adapter->CleanupSessions(); |
396 } | 401 } |
397 | 402 |
398 } // namespace device | 403 } // namespace device |
OLD | NEW |