Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: chrome/browser/chromeos/login/saml/saml_browsertest.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <cstring> 5 #include <cstring>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 EXPECT_CALL(provider_, IsInitializationComplete(_)) 961 EXPECT_CALL(provider_, IsInitializationComplete(_))
962 .WillRepeatedly(Return(true)); 962 .WillRepeatedly(Return(true));
963 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); 963 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_);
964 } 964 }
965 965
966 void SAMLPolicyTest::SetUpOnMainThread() { 966 void SAMLPolicyTest::SetUpOnMainThread() {
967 SamlTest::SetUpOnMainThread(); 967 SamlTest::SetUpOnMainThread();
968 968
969 // Pretend that the test users' OAuth tokens are valid. 969 // Pretend that the test users' OAuth tokens are valid.
970 user_manager::UserManager::Get()->SaveUserOAuthStatus( 970 user_manager::UserManager::Get()->SaveUserOAuthStatus(
971 kFirstSAMLUserEmail, user_manager::User::OAUTH2_TOKEN_STATUS_VALID); 971 AccountId::FromUserEmail(kFirstSAMLUserEmail),
972 user_manager::User::OAUTH2_TOKEN_STATUS_VALID);
972 user_manager::UserManager::Get()->SaveUserOAuthStatus( 973 user_manager::UserManager::Get()->SaveUserOAuthStatus(
973 kNonSAMLUserEmail, user_manager::User::OAUTH2_TOKEN_STATUS_VALID); 974 AccountId::FromUserEmail(kNonSAMLUserEmail),
975 user_manager::User::OAUTH2_TOKEN_STATUS_VALID);
974 user_manager::UserManager::Get()->SaveUserOAuthStatus( 976 user_manager::UserManager::Get()->SaveUserOAuthStatus(
975 kDifferentDomainSAMLUserEmail, 977 AccountId::FromUserEmail(kDifferentDomainSAMLUserEmail),
976 user_manager::User::OAUTH2_TOKEN_STATUS_VALID); 978 user_manager::User::OAUTH2_TOKEN_STATUS_VALID);
977 979
978 // Set up fake networks. 980 // Set up fake networks.
979 DBusThreadManager::Get() 981 DBusThreadManager::Get()
980 ->GetShillManagerClient() 982 ->GetShillManagerClient()
981 ->GetTestInterface() 983 ->GetTestInterface()
982 ->SetupDefaultEnvironment(); 984 ->SetupDefaultEnvironment();
983 } 985 }
984 986
985 void SAMLPolicyTest::SetSAMLOfflineSigninTimeLimitPolicy(int limit) { 987 void SAMLPolicyTest::SetSAMLOfflineSigninTimeLimitPolicy(int limit) {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 kTestAuthLSIDCookie1); 1221 kTestAuthLSIDCookie1);
1220 1222
1221 GetCookies(); 1223 GetCookies();
1222 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); 1224 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName));
1223 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); 1225 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName));
1224 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName)); 1226 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName));
1225 } 1227 }
1226 1228
1227 1229
1228 } // namespace chromeos 1230 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/reauth_stats.cc ('k') | chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698