diff options
author | jennb@chromium.org <jennb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-23 00:50:55 +0000 |
---|---|---|
committer | jennb@chromium.org <jennb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-23 00:50:55 +0000 |
commit | 1a6273b7545c8413208cd1831862870827645f1e (patch) | |
tree | fd3f8eb767678672b78c9cd6332292cc0e76fa4d | |
parent | f0e0ac2c4ef9c2fc410b11b7d09ccd65418b0247 (diff) | |
download | chromium_src-1a6273b7545c8413208cd1831862870827645f1e.zip chromium_src-1a6273b7545c8413208cd1831862870827645f1e.tar.gz chromium_src-1a6273b7545c8413208cd1831862870827645f1e.tar.bz2 |
Update infobar references to balloon and delete obsoleted tests for multiple infobars.
BUG=None
TEST=Browser tests still pass.
Review URL: http://codereview.chromium.org/6894034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82758 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/extensions/extension_crash_recovery_browsertest.cc | 77 |
1 files changed, 3 insertions, 74 deletions
diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc index 3dd85a9..7323b05 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); } |