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

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

Issue 1057603004: bluetooth: Refactor (Add|Remove)Observer impls into BluetoothAdapter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-style-guide-ordering-
Patch Set: Merge TOT Created 5 years, 8 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_adapter_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_adapter_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698