| 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 |
| 74 void TestErrorCallback() {} | 79 void TestErrorCallback() {} |
| 75 | 80 |
| 76 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; | 81 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; |
| 77 | 82 |
| 78 void TestOnStartDiscoverySession( | 83 void TestOnStartDiscoverySession( |
| 79 scoped_ptr<device::BluetoothDiscoverySession> discovery_session) { | 84 scoped_ptr<device::BluetoothDiscoverySession> discovery_session) { |
| 80 discovery_sessions_.push_back(discovery_session.Pass()); | 85 discovery_sessions_.push_back(discovery_session.Pass()); |
| 81 } | 86 } |
| 82 | 87 |
| 83 void CleanupSessions() { discovery_sessions_.clear(); } | 88 void CleanupSessions() { discovery_sessions_.clear(); } |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 resulting_uuids.end()); | 388 resulting_uuids.end()); |
| 384 | 389 |
| 385 resulting_filter = adapter->GetMergedDiscoveryFilterMasked(df); | 390 resulting_filter = adapter->GetMergedDiscoveryFilterMasked(df); |
| 386 EXPECT_EQ(BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL, | 391 EXPECT_EQ(BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL, |
| 387 resulting_filter->GetTransport()); | 392 resulting_filter->GetTransport()); |
| 388 | 393 |
| 389 adapter->CleanupSessions(); | 394 adapter->CleanupSessions(); |
| 390 } | 395 } |
| 391 | 396 |
| 392 } // namespace device | 397 } // namespace device |
| OLD | NEW |