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/cryptauth/cryptauth_enrollment_manager.h" | 5 #include "components/proximity_auth/cryptauth/cryptauth_enrollment_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/base64url.h" | 9 #include "base/base64url.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/prefs/testing_pref_service.h" | |
13 #include "base/test/simple_test_clock.h" | 12 #include "base/test/simple_test_clock.h" |
14 #include "base/time/clock.h" | 13 #include "base/time/clock.h" |
15 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "components/prefs/testing_pref_service.h" |
16 #include "components/proximity_auth/cryptauth/cryptauth_enroller.h" | 16 #include "components/proximity_auth/cryptauth/cryptauth_enroller.h" |
17 #include "components/proximity_auth/cryptauth/fake_cryptauth_gcm_manager.h" | 17 #include "components/proximity_auth/cryptauth/fake_cryptauth_gcm_manager.h" |
18 #include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h" | 18 #include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h" |
19 #include "components/proximity_auth/cryptauth/mock_sync_scheduler.h" | 19 #include "components/proximity_auth/cryptauth/mock_sync_scheduler.h" |
20 #include "components/proximity_auth/cryptauth/pref_names.h" | 20 #include "components/proximity_auth/cryptauth/pref_names.h" |
21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 using ::testing::_; | 24 using ::testing::_; |
25 using ::testing::NiceMock; | 25 using ::testing::NiceMock; |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 // Simulate receiving a GCM push message, forcing the device to re-enroll. | 460 // Simulate receiving a GCM push message, forcing the device to re-enroll. |
461 gcm_manager_.PushReenrollMessage(); | 461 gcm_manager_.PushReenrollMessage(); |
462 auto completion_callback = | 462 auto completion_callback = |
463 FireSchedulerForEnrollment(cryptauth::INVOCATION_REASON_SERVER_INITIATED); | 463 FireSchedulerForEnrollment(cryptauth::INVOCATION_REASON_SERVER_INITIATED); |
464 | 464 |
465 EXPECT_CALL(*this, OnEnrollmentFinishedProxy(true)); | 465 EXPECT_CALL(*this, OnEnrollmentFinishedProxy(true)); |
466 completion_callback.Run(true); | 466 completion_callback.Run(true); |
467 } | 467 } |
468 | 468 |
469 } // namespace proximity_auth | 469 } // namespace proximity_auth |
OLD | NEW |