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

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

Issue 14846026: [Translate] When reloading a page Wait until some content has actually been re-loaded before trigg… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 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
diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc
index 1d4e4fc7098e6fcf11bf3f049ef7c322d5407501..90110faa714a67a1665d7157d6967d65a70da2c5 100644
--- a/chrome/browser/translate/translate_manager_browsertest.cc
+++ b/chrome/browser/translate/translate_manager_browsertest.cc
@@ -235,6 +235,7 @@ class TranslateManagerBrowserTest : public ChromeRenderViewHostTestHarness,
TranslateManager::GetInstance()->ClearTranslateScript();
TranslateManager::GetInstance()->
set_translate_script_expiration_delay(60 * 60 * 1000);
+ TranslateManager::GetInstance()->set_translate_max_reload_attemps(0);
ChromeRenderViewHostTestHarness::SetUp();
InfoBarService::CreateForWebContents(web_contents());
@@ -766,6 +767,12 @@ TEST_F(TranslateManagerBrowserTest, Reload) {
// And not show it if the reload fails
ReloadAndWait(false);
EXPECT_EQ(NULL, GetTranslateInfoBar());
+
+ // Set reload attempts to a high value, we will not see the infobar
+ // immediatly.
+ TranslateManager::GetInstance()->set_translate_max_reload_attemps(100);
+ ReloadAndWait(true);
+ EXPECT_TRUE(GetTranslateInfoBar() == NULL);
}
// Test that reloading the page by way of typing again the URL in the
« 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