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

Side by Side Diff: chrome/browser/chromeos/preferences_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/preferences.h" 5 #include "chrome/browser/chromeos/preferences.h"
6 6
7 #include "base/json/json_string_value_serializer.h" 7 #include "base/json/json_string_value_serializer.h"
8 #include "base/prefs/pref_member.h" 8 #include "base/prefs/pref_member.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 profile_manager_.reset( 148 profile_manager_.reset(
149 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); 149 new TestingProfileManager(TestingBrowserProcess::GetGlobal()));
150 ASSERT_TRUE(profile_manager_->SetUp()); 150 ASSERT_TRUE(profile_manager_->SetUp());
151 151
152 chromeos::FakeChromeUserManager* user_manager = 152 chromeos::FakeChromeUserManager* user_manager =
153 new chromeos::FakeChromeUserManager(); 153 new chromeos::FakeChromeUserManager();
154 user_manager_enabler_.reset( 154 user_manager_enabler_.reset(
155 new chromeos::ScopedUserManagerEnabler(user_manager)); 155 new chromeos::ScopedUserManagerEnabler(user_manager));
156 156
157 const char test_user_email[] = "test_user@example.com"; 157 const char test_user_email[] = "test_user@example.com";
158 test_user_ = user_manager->AddUser(test_user_email); 158 const AccountId test_account_id(AccountId::FromUserEmail(test_user_email));
159 user_manager->LoginUser(test_user_email); 159 test_user_ = user_manager->AddUser(test_account_id);
160 user_manager->SwitchActiveUser(test_user_email); 160 user_manager->LoginUser(test_account_id);
161 user_manager->SwitchActiveUser(test_account_id);
161 162
162 test_profile_ = profile_manager_->CreateTestingProfile( 163 test_profile_ = profile_manager_->CreateTestingProfile(
163 chrome::kInitialProfile); 164 chrome::kInitialProfile);
164 pref_service_ = test_profile_->GetTestingPrefService(); 165 pref_service_ = test_profile_->GetTestingPrefService();
165 166
166 previous_input_method_.Init( 167 previous_input_method_.Init(
167 prefs::kLanguagePreviousInputMethod, pref_service_); 168 prefs::kLanguagePreviousInputMethod, pref_service_);
168 previous_input_method_.SetValue("KeyboardA"); 169 previous_input_method_.SetValue("KeyboardA");
169 current_input_method_.Init( 170 current_input_method_.Init(
170 prefs::kLanguageCurrentInputMethod, pref_service_); 171 prefs::kLanguageCurrentInputMethod, pref_service_);
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 "Syncable values should have added local values on initialization."); 699 "Syncable values should have added local values on initialization.");
699 ExpectGlobalValues( 700 ExpectGlobalValues(
700 "es,en-US", 701 "es,en-US",
701 "xkb:es::spa,xkb:us::eng,xkb:ru::rus,xkb:xy::xyz," + 702 "xkb:es::spa,xkb:us::eng,xkb:ru::rus,xkb:xy::xyz," +
702 ToInputMethodIds("xkb:jp::jpn"), 703 ToInputMethodIds("xkb:jp::jpn"),
703 std::string(kIdentityIMEID) + "," + kUnknownIMEID); 704 std::string(kIdentityIMEID) + "," + kUnknownIMEID);
704 } 705 }
705 } 706 }
706 707
707 } // namespace chromeos 708 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698