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

Unified Diff: chrome/browser/download/download_browsertest.cc

Issue 14241006: Eliminate InfoBarTabHelper. Make InfoBarService a concrete class. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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
Index: chrome/browser/download/download_browsertest.cc
===================================================================
--- chrome/browser/download/download_browsertest.cc (revision 195254)
+++ chrome/browser/download/download_browsertest.cc (working copy)
@@ -2681,17 +2681,14 @@
InfoBarService* infobar_service = InfoBarService::FromWebContents(
browser()->tab_strip_model()->GetActiveWebContents());
// Verify that there is only one infobar.
- EXPECT_EQ(1u, infobar_service->GetInfoBarCount());
+ ASSERT_EQ(1u, infobar_service->infobar_count());
// Get the infobar at index 0.
- int infobar_index = 0;
- InfoBarDelegate* infobar =
- infobar_service->GetInfoBarDelegateAt(infobar_index);
- EXPECT_TRUE(infobar != NULL);
+ InfoBarDelegate* infobar = infobar_service->infobar_at(0);
+ ASSERT_TRUE(infobar != NULL);
- ConfirmInfoBarDelegate* confirm_infobar =
- infobar->AsConfirmInfoBarDelegate();
- EXPECT_TRUE(confirm_infobar != NULL);
+ ConfirmInfoBarDelegate* confirm_infobar = infobar->AsConfirmInfoBarDelegate();
+ ASSERT_TRUE(confirm_infobar != NULL);
// Verify multi download warning infobar message.
EXPECT_EQ(confirm_infobar->GetMessageText(),
@@ -2701,7 +2698,7 @@
if (confirm_infobar->Accept())
infobar_service->RemoveInfoBar(infobar);
// Verify that there are no more infobars.
- EXPECT_EQ(0u, infobar_service->GetInfoBarCount());
+ EXPECT_EQ(0u, infobar_service->infobar_count());
// Waits for the download to complete.
downloads_observer->WaitForFinished();

Powered by Google App Engine
This is Rietveld 408576698