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/macros.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/message_loop/message_loop.h" |
9 #include "base/test/simple_test_clock.h" | 10 #include "base/test/simple_test_clock.h" |
10 #include "base/test/test_simple_task_runner.h" | 11 #include "base/test/test_simple_task_runner.h" |
11 #include "base/time/clock.h" | 12 #include "base/time/clock.h" |
12 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_factory
.h" | 13 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_factory
.h" |
13 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" | 14 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" |
14 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 15 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
15 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
17 #include "chrome/test/base/testing_browser_process.h" | 18 #include "chrome/test/base/testing_browser_process.h" |
18 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 EXPECT_CALL(*user_manager_, SaveForceOnlineSignin(test_account_id_, true)) | 653 EXPECT_CALL(*user_manager_, SaveForceOnlineSignin(test_account_id_, true)) |
653 .Times(1); | 654 .Times(1); |
654 limiter_->SignedIn(UserContext::AUTH_FLOW_OFFLINE); | 655 limiter_->SignedIn(UserContext::AUTH_FLOW_OFFLINE); |
655 | 656 |
656 const base::Time last_gaia_signin_time = base::Time::FromInternalValue( | 657 const base::Time last_gaia_signin_time = base::Time::FromInternalValue( |
657 prefs->GetInt64(prefs::kSAMLLastGAIASignInTime)); | 658 prefs->GetInt64(prefs::kSAMLLastGAIASignInTime)); |
658 EXPECT_EQ(gaia_signin_time, last_gaia_signin_time); | 659 EXPECT_EQ(gaia_signin_time, last_gaia_signin_time); |
659 } | 660 } |
660 | 661 |
661 } // namespace chromeos | 662 } // namespace chromeos |
OLD | NEW |