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

Unified Diff: chrome/browser/extensions/extension_crash_recovery_browsertest.cc

Issue 6894034: Update infobar references to balloon and delete obsoleted tests for multiple infobars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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/extensions/extension_crash_recovery_browsertest.cc
diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
index 3dd85a9743d60656c1e18e12548832ae1c73f8ca..7323b054fcca8d1891b3013b67e6a27832688979 100644
--- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
+++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
@@ -225,80 +225,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
SCOPED_TRACE("after reloading");
CheckExtensionConsistency(size_before);
- // The infobar should automatically hide after the extension is successfully
- // reloaded.
- ASSERT_EQ(0U, CountBalloons());
-}
-
-IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
- ReloadIndependentlyTwoInfoBars) {
- const size_t size_before = GetExtensionService()->extensions()->size();
- LoadTestExtension();
-
- // Open a new window so that there will be an info bar in each.
- Browser* browser2 = CreateBrowser(browser()->profile());
-
- CrashExtension(size_before);
- ASSERT_EQ(size_before, GetExtensionService()->extensions()->size());
-
- TabContents* current_tab = browser()->GetSelectedTabContents();
- ASSERT_TRUE(current_tab);
- ASSERT_EQ(1U, CountBalloons());
-
- TabContents* current_tab2 = browser2->GetSelectedTabContents();
- ASSERT_TRUE(current_tab2);
- ASSERT_EQ(1U, CountBalloons());
-
- ReloadExtension(first_extension_id_);
-
- SCOPED_TRACE("after reloading");
- CheckExtensionConsistency(size_before);
-
- // Both infobars should automatically hide after the extension is successfully
- // reloaded.
- ASSERT_EQ(0U, CountBalloons());
- ASSERT_EQ(0U, CountBalloons());
-}
-
-IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
- ReloadIndependentlyTwoInfoBarsSameBrowser) {
- const size_t size_before = GetExtensionService()->extensions()->size();
- LoadTestExtension();
-
- // Open a new window so that there will be an info bar in each.
- Browser* browser2 = CreateBrowser(browser()->profile());
-
- CrashExtension(size_before);
- ASSERT_EQ(size_before, GetExtensionService()->extensions()->size());
-
- TabContents* current_tab = browser()->GetSelectedTabContents();
- ASSERT_TRUE(current_tab);
- ASSERT_EQ(1U, CountBalloons());
-
- TabContents* current_tab2 = browser2->GetSelectedTabContents();
- ASSERT_TRUE(current_tab2);
- ASSERT_EQ(1U, CountBalloons());
-
- // Move second window into first browser so there will be multiple tabs
- // with the info bar for the same extension in one browser.
- TabContentsWrapper* contents =
- browser2->tabstrip_model()->DetachTabContentsAt(0);
- browser()->tabstrip_model()->AppendTabContents(contents, true);
- current_tab2 = browser()->GetSelectedTabContents();
- ASSERT_EQ(1U, CountBalloons());
- ASSERT_NE(current_tab2, current_tab);
-
- ReloadExtension(first_extension_id_);
-
- SCOPED_TRACE("after reloading");
- CheckExtensionConsistency(size_before);
-
- // Both infobars should automatically hide after the extension is successfully
+ // The balloon should automatically hide after the extension is successfully
// reloaded.
ASSERT_EQ(0U, CountBalloons());
- browser()->SelectPreviousTab();
- ASSERT_EQ(current_tab, browser()->GetSelectedTabContents());
- ASSERT_EQ(0U, CountBalloons());
}
// Make sure that when we don't do anything about the crashed extension
@@ -437,10 +366,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
SCOPED_TRACE("first: reload");
TabContents* current_tab = browser()->GetSelectedTabContents();
ASSERT_TRUE(current_tab);
- // At the beginning we should have one infobar displayed for each extension.
+ // At the beginning we should have one balloon displayed for each extension.
ASSERT_EQ(2U, CountBalloons());
ReloadExtension(first_extension_id_);
- // One of the infobars should hide after the extension is reloaded.
+ // One of the balloons should hide after the extension is reloaded.
ASSERT_EQ(1U, CountBalloons());
CheckExtensionConsistency(size_before);
}
« 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