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 "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h
" | 5 #include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h
" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "components/cryptauth/remote_device.h" |
19 #include "components/proximity_auth/ble/bluetooth_low_energy_device_whitelist.h" | 20 #include "components/proximity_auth/ble/bluetooth_low_energy_device_whitelist.h" |
20 #include "components/proximity_auth/fake_connection.h" | 21 #include "components/proximity_auth/fake_connection.h" |
21 #include "components/proximity_auth/proximity_auth_test_util.h" | 22 #include "components/proximity_auth/proximity_auth_test_util.h" |
22 #include "components/proximity_auth/remote_device.h" | |
23 #include "components/proximity_auth/wire_message.h" | 23 #include "components/proximity_auth/wire_message.h" |
24 #include "device/bluetooth/bluetooth_adapter_factory.h" | 24 #include "device/bluetooth/bluetooth_adapter_factory.h" |
25 #include "device/bluetooth/bluetooth_uuid.h" | 25 #include "device/bluetooth/bluetooth_uuid.h" |
26 #include "device/bluetooth/test/mock_bluetooth_adapter.h" | 26 #include "device/bluetooth/test/mock_bluetooth_adapter.h" |
27 #include "device/bluetooth/test/mock_bluetooth_device.h" | 27 #include "device/bluetooth/test/mock_bluetooth_device.h" |
28 #include "device/bluetooth/test/mock_bluetooth_discovery_session.h" | 28 #include "device/bluetooth/test/mock_bluetooth_discovery_session.h" |
29 #include "device/bluetooth/test/mock_bluetooth_gatt_connection.h" | 29 #include "device/bluetooth/test/mock_bluetooth_gatt_connection.h" |
30 #include "testing/gmock/include/gmock/gmock.h" | 30 #include "testing/gmock/include/gmock/gmock.h" |
31 #include "testing/gtest/include/gtest/gtest.h" | 31 #include "testing/gtest/include/gtest/gtest.h" |
32 | 32 |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 // Completing the connection. | 485 // Completing the connection. |
486 base::RunLoop run_loop; | 486 base::RunLoop run_loop; |
487 ASSERT_FALSE(last_found_connection_); | 487 ASSERT_FALSE(last_found_connection_); |
488 connection->SetStatus(Connection::IN_PROGRESS); | 488 connection->SetStatus(Connection::IN_PROGRESS); |
489 connection->SetStatus(Connection::CONNECTED); | 489 connection->SetStatus(Connection::CONNECTED); |
490 run_loop.RunUntilIdle(); | 490 run_loop.RunUntilIdle(); |
491 EXPECT_TRUE(last_found_connection_); | 491 EXPECT_TRUE(last_found_connection_); |
492 } | 492 } |
493 | 493 |
494 } // namespace proximity_auth | 494 } // namespace proximity_auth |
OLD | NEW |