| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |