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

Side by Side Diff: chrome/browser/chromeos/preferences_unittest.cc

Issue 1425093004: Revert of 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: 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 const AccountId test_account_id(AccountId::FromUserEmail(test_user_email)); 158 test_user_ = user_manager->AddUser(test_user_email);
159 test_user_ = user_manager->AddUser(test_account_id); 159 user_manager->LoginUser(test_user_email);
160 user_manager->LoginUser(test_account_id); 160 user_manager->SwitchActiveUser(test_user_email);
161 user_manager->SwitchActiveUser(test_account_id);
162 161
163 test_profile_ = profile_manager_->CreateTestingProfile( 162 test_profile_ = profile_manager_->CreateTestingProfile(
164 chrome::kInitialProfile); 163 chrome::kInitialProfile);
165 pref_service_ = test_profile_->GetTestingPrefService(); 164 pref_service_ = test_profile_->GetTestingPrefService();
166 165
167 previous_input_method_.Init( 166 previous_input_method_.Init(
168 prefs::kLanguagePreviousInputMethod, pref_service_); 167 prefs::kLanguagePreviousInputMethod, pref_service_);
169 previous_input_method_.SetValue("KeyboardA"); 168 previous_input_method_.SetValue("KeyboardA");
170 current_input_method_.Init( 169 current_input_method_.Init(
171 prefs::kLanguageCurrentInputMethod, pref_service_); 170 prefs::kLanguageCurrentInputMethod, pref_service_);
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 "Syncable values should have added local values on initialization."); 698 "Syncable values should have added local values on initialization.");
700 ExpectGlobalValues( 699 ExpectGlobalValues(
701 "es,en-US", 700 "es,en-US",
702 "xkb:es::spa,xkb:us::eng,xkb:ru::rus,xkb:xy::xyz," + 701 "xkb:es::spa,xkb:us::eng,xkb:ru::rus,xkb:xy::xyz," +
703 ToInputMethodIds("xkb:jp::jpn"), 702 ToInputMethodIds("xkb:jp::jpn"),
704 std::string(kIdentityIMEID) + "," + kUnknownIMEID); 703 std::string(kIdentityIMEID) + "," + kUnknownIMEID);
705 } 704 }
706 } 705 }
707 706
708 } // namespace chromeos 707 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698