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 "components/proximity_auth/bluetooth_connection_finder.h" | 5 #include "components/proximity_auth/bluetooth_connection_finder.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "components/cryptauth/remote_device.h" |
17 #include "components/proximity_auth/proximity_auth_test_util.h" | 18 #include "components/proximity_auth/proximity_auth_test_util.h" |
18 #include "components/proximity_auth/remote_device.h" | |
19 #include "components/proximity_auth/wire_message.h" | 19 #include "components/proximity_auth/wire_message.h" |
20 #include "device/bluetooth/bluetooth_adapter_factory.h" | 20 #include "device/bluetooth/bluetooth_adapter_factory.h" |
21 #include "device/bluetooth/bluetooth_uuid.h" | 21 #include "device/bluetooth/bluetooth_uuid.h" |
22 #include "device/bluetooth/test/mock_bluetooth_adapter.h" | 22 #include "device/bluetooth/test/mock_bluetooth_adapter.h" |
23 #include "device/bluetooth/test/mock_bluetooth_device.h" | 23 #include "device/bluetooth/test/mock_bluetooth_device.h" |
24 #include "testing/gmock/include/gmock/gmock.h" | 24 #include "testing/gmock/include/gmock/gmock.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
26 | 26 |
27 using testing::_; | 27 using testing::_; |
28 using testing::NiceMock; | 28 using testing::NiceMock; |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 358 |
359 // Successfully connect to the Bluetooth device. | 359 // Successfully connect to the Bluetooth device. |
360 ON_CALL(*adapter_, GetDevice(kTestRemoteDeviceBluetoothAddress)) | 360 ON_CALL(*adapter_, GetDevice(kTestRemoteDeviceBluetoothAddress)) |
361 .WillByDefault(Return(bluetooth_device_.get())); | 361 .WillByDefault(Return(bluetooth_device_.get())); |
362 MockConnection* connection = connection_finder_.ExpectCreateConnection(); | 362 MockConnection* connection = connection_finder_.ExpectCreateConnection(); |
363 connection_finder_.seek_callback().Run(); | 363 connection_finder_.seek_callback().Run(); |
364 SimulateDeviceConnection(connection); | 364 SimulateDeviceConnection(connection); |
365 } | 365 } |
366 | 366 |
367 } // namespace proximity_auth | 367 } // namespace proximity_auth |
OLD | NEW |