| 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" |
| 11 | 11 |
| 12 using device::BluetoothAdapter; | 12 using device::BluetoothAdapter; |
| 13 using device::BluetoothDevice; | 13 using device::BluetoothDevice; |
| 14 | 14 |
| 15 namespace device { | 15 namespace device { |
| 16 | 16 |
| 17 class TestBluetoothAdapter : public BluetoothAdapter { | 17 class TestBluetoothAdapter : public BluetoothAdapter { |
| 18 public: | 18 public: |
| 19 TestBluetoothAdapter() { | 19 TestBluetoothAdapter() { |
| 20 } | 20 } |
| 21 | 21 |
| 22 void AddObserver(BluetoothAdapter::Observer* observer) override {} | |
| 23 | |
| 24 void RemoveObserver(BluetoothAdapter::Observer* observer) override {} | |
| 25 | |
| 26 std::string GetAddress() const override { return ""; } | 22 std::string GetAddress() const override { return ""; } |
| 27 | 23 |
| 28 std::string GetName() const override { return ""; } | 24 std::string GetName() const override { return ""; } |
| 29 | 25 |
| 30 void SetName(const std::string& name, | 26 void SetName(const std::string& name, |
| 31 const base::Closure& callback, | 27 const base::Closure& callback, |
| 32 const ErrorCallback& error_callback) override {} | 28 const ErrorCallback& error_callback) override {} |
| 33 | 29 |
| 34 bool IsInitialized() const override { return false; } | 30 bool IsInitialized() const override { return false; } |
| 35 | 31 |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 resulting_uuids.end()); | 385 resulting_uuids.end()); |
| 390 | 386 |
| 391 resulting_filter = adapter->GetMergedDiscoveryFilterMasked(df); | 387 resulting_filter = adapter->GetMergedDiscoveryFilterMasked(df); |
| 392 EXPECT_EQ(BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL, | 388 EXPECT_EQ(BluetoothDiscoveryFilter::Transport::TRANSPORT_DUAL, |
| 393 resulting_filter->GetTransport()); | 389 resulting_filter->GetTransport()); |
| 394 | 390 |
| 395 adapter->CleanupSessions(); | 391 adapter->CleanupSessions(); |
| 396 } | 392 } |
| 397 | 393 |
| 398 } // namespace device | 394 } // namespace device |
| OLD | NEW |