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())); |