| 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 "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" | 5 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 8 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 9 #include "base/prefs/testing_pref_service.h" | 10 #include "base/prefs/testing_pref_service.h" |
| 10 #include "base/test/simple_test_clock.h" | 11 #include "base/test/simple_test_clock.h" |
| 11 #include "base/test/test_simple_task_runner.h" | 12 #include "base/test/test_simple_task_runner.h" |
| 12 #include "base/thread_task_runner_handle.h" | 13 #include "base/thread_task_runner_handle.h" |
| 13 #include "base/time/clock.h" | 14 #include "base/time/clock.h" |
| 14 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_factory
.h" | 15 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_factory
.h" |
| 15 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" | 16 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" |
| 16 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 17 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 EXPECT_CALL(*user_manager_, SaveForceOnlineSignin(test_account_id_, true)) | 648 EXPECT_CALL(*user_manager_, SaveForceOnlineSignin(test_account_id_, true)) |
| 648 .Times(1); | 649 .Times(1); |
| 649 limiter_->SignedIn(UserContext::AUTH_FLOW_OFFLINE); | 650 limiter_->SignedIn(UserContext::AUTH_FLOW_OFFLINE); |
| 650 | 651 |
| 651 const base::Time last_gaia_signin_time = base::Time::FromInternalValue( | 652 const base::Time last_gaia_signin_time = base::Time::FromInternalValue( |
| 652 prefs->GetInt64(prefs::kSAMLLastGAIASignInTime)); | 653 prefs->GetInt64(prefs::kSAMLLastGAIASignInTime)); |
| 653 EXPECT_EQ(gaia_signin_time, last_gaia_signin_time); | 654 EXPECT_EQ(gaia_signin_time, last_gaia_signin_time); |
| 654 } | 655 } |
| 655 | 656 |
| 656 } // namespace chromeos | 657 } // namespace chromeos |
| OLD | NEW |