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

Unified Diff: chrome/browser/translate/translate_manager_browsertest.cc

Issue 7589002: Fix a crash in the translate info bar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « chrome/browser/translate/translate_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_manager_browsertest.cc
===================================================================
--- chrome/browser/translate/translate_manager_browsertest.cc (revision 95968)
+++ chrome/browser/translate/translate_manager_browsertest.cc (working copy)
@@ -903,6 +903,17 @@
// Expect the infobar to pop up
EXPECT_TRUE(GetTranslateInfoBar() != NULL);
+
+ // Set Qbz and English-US as the only accepted languages to test the country
+ // code removal code which was causing a crash as filed in Issue 90106,
+ // a crash caused by a language with a country code that wasn't recognized.
+ prefs->SetString(prefs::kAcceptLanguages, "qbz,en-us");
+
+ // Go to a German page
+ SimulateNavigation(GURL("http://google.de"), "de", true);
+
+ // Expect the infobar to pop up
+ EXPECT_TRUE(GetTranslateInfoBar() != NULL);
}
// Tests that the translate enabled preference is honored.
« no previous file with comments | « chrome/browser/translate/translate_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698