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

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

Issue 1055863002: ChromeOS: switch UI language before apps are loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix initial locale load, when no user is active yet. Created 5 years, 7 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 (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/login/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/json/json_file_value_serializer.h" 10 #include "base/json/json_file_value_serializer.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 self->result = result; 140 self->result = result;
141 self->done = true; 141 self->done = true;
142 } 142 }
143 143
144 void RunSwitchLanguageTest(const std::string& locale, 144 void RunSwitchLanguageTest(const std::string& locale,
145 const std::string& expected_locale, 145 const std::string& expected_locale,
146 const bool expect_success) { 146 const bool expect_success) {
147 SwitchLanguageTestData data; 147 SwitchLanguageTestData data;
148 locale_util::SwitchLanguageCallback callback( 148 locale_util::SwitchLanguageCallback callback(
149 base::Bind(&OnLocaleSwitched, base::Unretained(&data))); 149 base::Bind(&OnLocaleSwitched, base::Unretained(&data)));
150 locale_util::SwitchLanguage(locale, true, false, callback); 150 locale_util::SwitchLanguage(locale, true, false, callback,
151 ProfileManager::GetActiveUserProfile());
151 152
152 // Token writing moves control to BlockingPool and back. 153 // Token writing moves control to BlockingPool and back.
153 content::RunAllBlockingPoolTasksUntilIdle(); 154 content::RunAllBlockingPoolTasksUntilIdle();
154 155
155 EXPECT_EQ(data.done, true); 156 EXPECT_EQ(data.done, true);
156 EXPECT_EQ(data.result.requested_locale, locale); 157 EXPECT_EQ(data.result.requested_locale, locale);
157 EXPECT_EQ(data.result.loaded_locale, expected_locale); 158 EXPECT_EQ(data.result.loaded_locale, expected_locale);
158 EXPECT_EQ(data.result.success, expect_success); 159 EXPECT_EQ(data.result.success, expect_success);
159 } 160 }
160 161
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when 1262 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when
1262 // UI and logic is ready. http://crbug.com/127016 1263 // UI and logic is ready. http://crbug.com/127016
1263 1264
1264 // TODO(dzhioev): Add tests for controller/host pairing flow. 1265 // TODO(dzhioev): Add tests for controller/host pairing flow.
1265 // http://crbug.com/375191 1266 // http://crbug.com/375191
1266 1267
1267 static_assert(BaseScreenDelegate::EXIT_CODES_COUNT == 24, 1268 static_assert(BaseScreenDelegate::EXIT_CODES_COUNT == 24,
1268 "tests for new control flow are missing"); 1269 "tests for new control flow are missing");
1269 1270
1270 } // namespace chromeos 1271 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698