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

Side by Side Diff: chrome/browser/chromeos/login/login_manager_test.cc

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests. Created 4 years, 9 months 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/login_manager_test.h" 5 #include "chrome/browser/chromeos/login/login_manager_test.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 const char kGAIAHost[] = "accounts.google.com"; 44 const char kGAIAHost[] = "accounts.google.com";
45 const char kTestUserinfoToken1[] = "fake-userinfo-token-1"; 45 const char kTestUserinfoToken1[] = "fake-userinfo-token-1";
46 const char kTestRefreshToken1[] = "fake-refresh-token-1"; 46 const char kTestRefreshToken1[] = "fake-refresh-token-1";
47 const char kTestUserinfoToken2[] = "fake-userinfo-token-2"; 47 const char kTestUserinfoToken2[] = "fake-userinfo-token-2";
48 const char kTestRefreshToken2[] = "fake-refresh-token-2"; 48 const char kTestRefreshToken2[] = "fake-refresh-token-2";
49 49
50 UserContext CreateUserContext(const std::string& user_id) { 50 UserContext CreateUserContext(const std::string& user_id) {
51 UserContext user_context(AccountId::FromUserEmailGaiaId( 51 UserContext user_context(AccountId::FromUserEmailGaiaId(
52 user_id, LoginManagerTest::GetGaiaIDForUserID(user_id))); 52 user_id, LoginManagerTest::GetGaiaIDForUserID(user_id)));
53 user_context.SetGaiaID(LoginManagerTest::GetGaiaIDForUserID(user_id));
54 user_context.SetKey(Key("password")); 53 user_context.SetKey(Key("password"));
55 if (user_id == LoginManagerTest::kEnterpriseUser1) { 54 if (user_id == LoginManagerTest::kEnterpriseUser1) {
56 user_context.SetRefreshToken(kTestRefreshToken1); 55 user_context.SetRefreshToken(kTestRefreshToken1);
57 } else if (user_id == LoginManagerTest::kEnterpriseUser2) { 56 } else if (user_id == LoginManagerTest::kEnterpriseUser2) {
58 user_context.SetRefreshToken(kTestRefreshToken2); 57 user_context.SetRefreshToken(kTestRefreshToken2);
59 } 58 }
60 return user_context; 59 return user_context;
61 } 60 }
62 61
63 } // namespace 62 } // namespace
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 EXPECT_TRUE(host != NULL); 221 EXPECT_TRUE(host != NULL);
223 222
224 content::WebContents* web_contents = 223 content::WebContents* web_contents =
225 host->GetWebUILoginView()->GetWebContents(); 224 host->GetWebUILoginView()->GetWebContents();
226 EXPECT_TRUE(web_contents != NULL); 225 EXPECT_TRUE(web_contents != NULL);
227 set_web_contents(web_contents); 226 set_web_contents(web_contents);
228 js_checker_.set_web_contents(web_contents); 227 js_checker_.set_web_contents(web_contents);
229 } 228 }
230 229
231 } // namespace chromeos 230 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_browsertest.cc ('k') | chrome/browser/chromeos/login/saml/saml_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698