| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 const BluetoothUUID& uuid, | 64 const BluetoothUUID& uuid, |
| 65 const ServiceOptions& options, | 65 const ServiceOptions& options, |
| 66 const CreateServiceCallback& callback, | 66 const CreateServiceCallback& callback, |
| 67 const CreateServiceErrorCallback& error_callback) override {} | 67 const CreateServiceErrorCallback& error_callback) override {} |
| 68 | 68 |
| 69 void RegisterAudioSink( | 69 void RegisterAudioSink( |
| 70 const BluetoothAudioSink::Options& options, | 70 const BluetoothAudioSink::Options& options, |
| 71 const AcquiredCallback& callback, | 71 const AcquiredCallback& callback, |
| 72 const BluetoothAudioSink::ErrorCallback& error_callback) override {} | 72 const BluetoothAudioSink::ErrorCallback& error_callback) override {} |
| 73 | 73 |
| 74 void RegisterAdvertisement( | |
| 75 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, | |
| 76 const CreateAdvertisementCallback& callback, | |
| 77 const CreateAdvertisementErrorCallback& error_callback) override {} | |
| 78 | |
| 79 void TestErrorCallback() {} | 74 void TestErrorCallback() {} |
| 80 | 75 |
| 81 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; | 76 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; |
| 82 | 77 |
| 83 void TestOnStartDiscoverySession( | 78 void TestOnStartDiscoverySession( |
| 84 scoped_ptr<device::BluetoothDiscoverySession> discovery_session) { | 79 scoped_ptr<device::BluetoothDiscoverySession> discovery_session) { |
| 85 discovery_sessions_.push_back(discovery_session.Pass()); | 80 discovery_sessions_.push_back(discovery_session.Pass()); |
| 86 } | 81 } |
| 87 | 82 |
| 88 void CleanupSessions() { discovery_sessions_.clear(); } | 83 void CleanupSessions() { discovery_sessions_.clear(); } |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 resulting_uuids.end()); | 383 resulting_uuids.end()); |
| 389 | 384 |
| 390 resulting_filter = adapter->GetMergedDiscoveryFilterMasked(df); | 385 resulting_filter = adapter->GetMergedDiscoveryFilterMasked(df); |
| 391 EXPECT_EQ(BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL, | 386 EXPECT_EQ(BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL, |
| 392 resulting_filter->GetTransport()); | 387 resulting_filter->GetTransport()); |
| 393 | 388 |
| 394 adapter->CleanupSessions(); | 389 adapter->CleanupSessions(); |
| 395 } | 390 } |
| 396 | 391 |
| 397 } // namespace device | 392 } // namespace device |
| OLD | NEW |