OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "device/bluetooth/test/bluetooth_test.h" | 5 #include "device/bluetooth/test/bluetooth_test.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "device/bluetooth/bluetooth_adapter.h" | 10 #include "device/bluetooth/bluetooth_adapter.h" |
11 | 11 |
12 namespace device { | 12 namespace device { |
13 | 13 |
14 const std::string BluetoothTestBase::kTestAdapterName = "FakeBluetoothAdapter"; | 14 const std::string BluetoothTestBase::kTestAdapterName = "FakeBluetoothAdapter"; |
15 const std::string BluetoothTestBase::kTestAdapterAddress = "A1:B2:C3:D4:E5:F6"; | 15 const std::string BluetoothTestBase::kTestAdapterAddress = "A1:B2:C3:D4:E5:F6"; |
16 | 16 |
17 const std::string BluetoothTestBase::kTestDeviceName = "FakeBluetoothDevice"; | |
18 const std::string BluetoothTestBase::kTestDeviceNameEmpty = ""; | |
19 | |
20 const std::string BluetoothTestBase::kTestUUID1 = "1800"; | |
scheib
2015/07/23 18:15:25
These have better names, they're from
https://deve
krstnmnlsn
2015/07/23 22:03:29
Done.
| |
21 const std::string BluetoothTestBase::kTestUUID2 = "1801"; | |
22 const std::string BluetoothTestBase::kTestUUID3 = "1802"; | |
23 const std::string BluetoothTestBase::kTestUUID4 = "1803"; | |
24 | |
17 BluetoothTestBase::BluetoothTestBase() { | 25 BluetoothTestBase::BluetoothTestBase() { |
18 } | 26 } |
19 | 27 |
20 BluetoothTestBase::~BluetoothTestBase() { | 28 BluetoothTestBase::~BluetoothTestBase() { |
21 } | 29 } |
22 | 30 |
23 void BluetoothTestBase::Callback() { | 31 void BluetoothTestBase::Callback() { |
24 ++callback_count_; | 32 ++callback_count_; |
25 } | 33 } |
26 | 34 |
(...skipping 15 matching lines...) Expand all Loading... | |
42 BluetoothTestBase::GetDiscoverySessionCallback() { | 50 BluetoothTestBase::GetDiscoverySessionCallback() { |
43 return base::Bind(&BluetoothTestBase::DiscoverySessionCallback, | 51 return base::Bind(&BluetoothTestBase::DiscoverySessionCallback, |
44 base::Unretained(this)); | 52 base::Unretained(this)); |
45 } | 53 } |
46 | 54 |
47 BluetoothAdapter::ErrorCallback BluetoothTestBase::GetErrorCallback() { | 55 BluetoothAdapter::ErrorCallback BluetoothTestBase::GetErrorCallback() { |
48 return base::Bind(&BluetoothTestBase::ErrorCallback, base::Unretained(this)); | 56 return base::Bind(&BluetoothTestBase::ErrorCallback, base::Unretained(this)); |
49 } | 57 } |
50 | 58 |
51 } // namespace device | 59 } // namespace device |
OLD | NEW |