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/remote_device_life_cycle_impl.h" | 5 #include "components/proximity_auth/remote_device_life_cycle_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/test/test_simple_task_runner.h" | 14 #include "base/test/test_simple_task_runner.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "components/proximity_auth/authenticator.h" | 16 #include "components/proximity_auth/authenticator.h" |
17 #include "components/proximity_auth/connection_finder.h" | 17 #include "components/proximity_auth/connection_finder.h" |
18 #include "components/proximity_auth/fake_connection.h" | 18 #include "components/proximity_auth/fake_connection.h" |
19 #include "components/proximity_auth/messenger.h" | 19 #include "components/proximity_auth/messenger.h" |
20 #include "components/proximity_auth/proximity_auth_test_util.h" | 20 #include "components/proximity_auth/proximity_auth_test_util.h" |
21 #include "components/proximity_auth/secure_context.h" | 21 #include "components/proximity_auth/secure_context.h" |
22 #include "components/proximity_auth/wire_message.h" | 22 #include "components/proximity_auth/wire_message.h" |
23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 | 25 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 307 |
308 // Authentication succeeds on second pass. | 308 // Authentication succeeds on second pass. |
309 Connection* connection = OnConnectionFound(); | 309 Connection* connection = OnConnectionFound(); |
310 Authenticate(Authenticator::Result::SUCCESS); | 310 Authenticate(Authenticator::Result::SUCCESS); |
311 EXPECT_TRUE(life_cycle_.GetMessenger()); | 311 EXPECT_TRUE(life_cycle_.GetMessenger()); |
312 EXPECT_CALL(*this, OnLifeCycleStateChanged(_, _)); | 312 EXPECT_CALL(*this, OnLifeCycleStateChanged(_, _)); |
313 connection->Disconnect(); | 313 connection->Disconnect(); |
314 } | 314 } |
315 | 315 |
316 } // namespace proximity_auth | 316 } // namespace proximity_auth |
OLD | NEW |