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

Unified Diff: chrome/browser/notifications/notification_browsertest.cc

Issue 228293004: InfoBarService inherits from InfoBarManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 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/notifications/notification_browsertest.cc
diff --git a/chrome/browser/notifications/notification_browsertest.cc b/chrome/browser/notifications/notification_browsertest.cc
index 671db01f33e9af4570154d712e6ac25b53fac864..587ed7cd47e5a563f473efc603063d1a84eefb5b 100644
--- a/chrome/browser/notifications/notification_browsertest.cc
+++ b/chrome/browser/notifications/notification_browsertest.cc
@@ -17,7 +17,6 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
#include "chrome/browser/infobars/infobar.h"
-#include "chrome/browser/infobars/infobar_manager.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/notifications/balloon_collection.h"
@@ -319,11 +318,10 @@ void NotificationsTest::AllowAllOrigins() {
void NotificationsTest::VerifyInfoBar(const Browser* browser, int index) {
InfoBarService* infobar_service = InfoBarService::FromWebContents(
browser->tab_strip_model()->GetWebContentsAt(index));
- InfoBarManager* infobar_manager = infobar_service->infobar_manager();
- ASSERT_EQ(1U, infobar_manager->infobar_count());
+ ASSERT_EQ(1U, infobar_service->infobar_count());
ConfirmInfoBarDelegate* confirm_infobar =
- infobar_manager->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate();
+ infobar_service->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate();
ASSERT_TRUE(confirm_infobar);
int buttons = confirm_infobar->GetButtons();
EXPECT_TRUE(buttons & ConfirmInfoBarDelegate::BUTTON_OK);
@@ -404,18 +402,17 @@ bool NotificationsTest::PerformActionOnInfoBar(
int tab_index) {
InfoBarService* infobar_service = InfoBarService::FromWebContents(
browser->tab_strip_model()->GetWebContentsAt(tab_index));
- InfoBarManager* infobar_manager = infobar_service->infobar_manager();
- if (infobar_index >= infobar_manager->infobar_count()) {
+ if (infobar_index >= infobar_service->infobar_count()) {
ADD_FAILURE();
return false;
}
- InfoBar* infobar = infobar_manager->infobar_at(infobar_index);
+ InfoBar* infobar = infobar_service->infobar_at(infobar_index);
InfoBarDelegate* infobar_delegate = infobar->delegate();
switch (action) {
case DISMISS:
infobar_delegate->InfoBarDismissed();
- infobar_manager->RemoveInfoBar(infobar);
+ infobar_service->RemoveInfoBar(infobar);
return true;
case ALLOW: {
@@ -424,7 +421,7 @@ bool NotificationsTest::PerformActionOnInfoBar(
if (!confirm_infobar_delegate) {
ADD_FAILURE();
} else if (confirm_infobar_delegate->Accept()) {
- infobar_manager->RemoveInfoBar(infobar);
+ infobar_service->RemoveInfoBar(infobar);
return true;
}
}
@@ -435,7 +432,7 @@ bool NotificationsTest::PerformActionOnInfoBar(
if (!confirm_infobar_delegate) {
ADD_FAILURE();
} else if (confirm_infobar_delegate->Cancel()) {
- infobar_manager->RemoveInfoBar(infobar);
+ infobar_service->RemoveInfoBar(infobar);
return true;
}
}
@@ -501,7 +498,7 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestUserGestureInfobar) {
InfoBarService* infobar_service = InfoBarService::FromWebContents(
browser()->tab_strip_model()->GetWebContentsAt(0));
- EXPECT_EQ(1U, infobar_service->infobar_manager()->infobar_count());
+ EXPECT_EQ(1U, infobar_service->infobar_count());
}
// If this flakes, use http://crbug.com/62311.
@@ -517,7 +514,7 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestNoUserGestureInfobar) {
InfoBarService* infobar_service = InfoBarService::FromWebContents(
browser()->tab_strip_model()->GetWebContentsAt(0));
- EXPECT_EQ(0U, infobar_service->infobar_manager()->infobar_count());
+ EXPECT_EQ(0U, infobar_service->infobar_count());
}
IN_PROC_BROWSER_TEST_F(NotificationsTest, TestCreateSimpleNotification) {
@@ -659,7 +656,7 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestAllowNotificationsFromAllSites) {
ASSERT_EQ(1, GetNotificationCount());
InfoBarService* infobar_service = InfoBarService::FromWebContents(
browser()->tab_strip_model()->GetWebContentsAt(0));
- EXPECT_EQ(0U, infobar_service->infobar_manager()->infobar_count());
+ EXPECT_EQ(0U, infobar_service->infobar_count());
}
IN_PROC_BROWSER_TEST_F(NotificationsTest, TestDenyNotificationsFromAllSites) {
@@ -727,7 +724,7 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestDenyAndThenAllowDomain) {
ASSERT_EQ(1, GetNotificationCount());
InfoBarService* infobar_service = InfoBarService::FromWebContents(
browser()->tab_strip_model()->GetWebContentsAt(0));
- EXPECT_EQ(0U, infobar_service->infobar_manager()->infobar_count());
+ EXPECT_EQ(0U, infobar_service->infobar_count());
}
IN_PROC_BROWSER_TEST_F(NotificationsTest, TestCreateDenyCloseNotifications) {
« no previous file with comments | « chrome/browser/media/webrtc_browsertest_base.cc ('k') | chrome/browser/password_manager/password_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698