Index: trunk/src/chrome/browser/notifications/notification_browsertest.cc |
=================================================================== |
--- trunk/src/chrome/browser/notifications/notification_browsertest.cc (revision 238401) |
+++ trunk/src/chrome/browser/notifications/notification_browsertest.cc (working copy) |
@@ -16,7 +16,6 @@ |
#include "chrome/browser/browser_process.h" |
#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_service.h" |
#include "chrome/browser/notifications/balloon.h" |
#include "chrome/browser/notifications/balloon_collection.h" |
@@ -321,7 +320,7 @@ |
ASSERT_EQ(1U, infobar_service->infobar_count()); |
ConfirmInfoBarDelegate* confirm_infobar = |
- infobar_service->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate(); |
+ infobar_service->infobar_at(0)->AsConfirmInfoBarDelegate(); |
ASSERT_TRUE(confirm_infobar); |
int buttons = confirm_infobar->GetButtons(); |
EXPECT_TRUE(buttons & ConfirmInfoBarDelegate::BUTTON_OK); |
@@ -407,12 +406,12 @@ |
return false; |
} |
- InfoBar* infobar = infobar_service->infobar_at(infobar_index); |
- InfoBarDelegate* infobar_delegate = infobar->delegate(); |
+ InfoBarDelegate* infobar_delegate = |
+ infobar_service->infobar_at(infobar_index); |
switch (action) { |
case DISMISS: |
infobar_delegate->InfoBarDismissed(); |
- infobar_service->RemoveInfoBar(infobar); |
+ infobar_service->RemoveInfoBar(infobar_delegate); |
return true; |
case ALLOW: { |
@@ -421,7 +420,7 @@ |
if (!confirm_infobar_delegate) { |
ADD_FAILURE(); |
} else if (confirm_infobar_delegate->Accept()) { |
- infobar_service->RemoveInfoBar(infobar); |
+ infobar_service->RemoveInfoBar(infobar_delegate); |
return true; |
} |
} |
@@ -432,7 +431,7 @@ |
if (!confirm_infobar_delegate) { |
ADD_FAILURE(); |
} else if (confirm_infobar_delegate->Cancel()) { |
- infobar_service->RemoveInfoBar(infobar); |
+ infobar_service->RemoveInfoBar(infobar_delegate); |
return true; |
} |
} |