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

Unified Diff: chrome/browser/ui/search/local_ntp_browsertest.cc

Issue 2854973005: Local NTP: Cleanup non-default-language tests (Closed)
Patch Set: rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/local_ntp_browsertest.cc
diff --git a/chrome/browser/ui/search/local_ntp_browsertest.cc b/chrome/browser/ui/search/local_ntp_browsertest.cc
index 98dc181b3fbe29b107fabe7d436232a0ddd86926..806ee10e01e97c43f154bc1f2a3b3d59a98ed71a 100644
--- a/chrome/browser/ui/search/local_ntp_browsertest.cc
+++ b/chrome/browser/ui/search/local_ntp_browsertest.cc
@@ -62,6 +62,10 @@ bool SwitchToFrench() {
EXPECT_NE("fr", default_locale);
// Switch browser language to French.
+ g_browser_process->SetApplicationLocale("fr");
+ PrefService* prefs = g_browser_process->local_state();
+ prefs->SetString(prefs::kApplicationLocale, "fr");
+
std::string loaded_locale =
ui::ResourceBundle::GetSharedInstance().ReloadLocaleResources("fr");
@@ -238,15 +242,6 @@ IN_PROC_BROWSER_TEST_F(LocalNTPTest, LoadsIframe) {
IN_PROC_BROWSER_TEST_F(LocalNTPTest,
NTPRespectsBrowserLanguageSetting) {
- // Make sure the default language is not French.
- std::string default_locale = g_browser_process->GetApplicationLocale();
- EXPECT_NE("fr", default_locale);
-
- // Switch browser language to French.
- base::ThreadRestrictions::ScopedAllowIO allow_io;
- std::string loaded_locale =
- ui::ResourceBundle::GetSharedInstance().ReloadLocaleResources("fr");
-
// If the platform cannot load the French locale (GetApplicationLocale() is
// platform specific, and has been observed to fail on a small number of
// platforms), abort the test.
@@ -255,10 +250,6 @@ IN_PROC_BROWSER_TEST_F(LocalNTPTest,
return;
}
- g_browser_process->SetApplicationLocale(loaded_locale);
- PrefService* prefs = g_browser_process->local_state();
- prefs->SetString(prefs::kApplicationLocale, loaded_locale);
-
// Setup Instant.
ASSERT_NO_FATAL_FAILURE(SetupInstant(browser()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698