Index: chrome/browser/autofill/autofill_browsertest.cc |
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc |
index 723b652eb65ef4459c2510e1e264c07e1d1b7d8a..3d9eeef24d565dbefea41ca48d46613bedc6af32 100644 |
--- a/chrome/browser/autofill/autofill_browsertest.cc |
+++ b/chrome/browser/autofill/autofill_browsertest.cc |
@@ -19,6 +19,7 @@ |
#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/profiles/profile.h" |
#include "chrome/browser/ui/browser.h" |
@@ -70,8 +71,11 @@ class WindowedPersonalDataManagerObserver |
} |
virtual ~WindowedPersonalDataManagerObserver() { |
- if (infobar_service_ && (infobar_service_->infobar_count() > 0)) |
- infobar_service_->RemoveInfoBar(infobar_service_->infobar_at(0)); |
+ if (infobar_service_ && |
+ (infobar_service_->infobar_manager().infobar_count() > 0)) { |
+ InfoBarManager& infobar_manager = infobar_service_->infobar_manager(); |
+ infobar_manager.RemoveInfoBar(infobar_manager.infobar_at(0)); |
+ } |
} |
void Wait() { |
@@ -103,8 +107,9 @@ class WindowedPersonalDataManagerObserver |
EXPECT_EQ(chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, type); |
infobar_service_ = InfoBarService::FromWebContents( |
browser_->tab_strip_model()->GetActiveWebContents()); |
+ InfoBarManager& infobar_manager = infobar_service_->infobar_manager(); |
ConfirmInfoBarDelegate* infobar_delegate = |
- infobar_service_->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate(); |
+ infobar_manager.infobar_at(0)->delegate()->AsConfirmInfoBarDelegate(); |
ASSERT_TRUE(infobar_delegate); |
infobar_delegate->Accept(); |
} |
@@ -488,10 +493,9 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, InvalidCreditCardNumberIsNotAggregated) { |
std::string card("4408 0412 3456 7890"); |
ASSERT_FALSE(autofill::IsValidCreditCardNumber(ASCIIToUTF16(card))); |
SubmitCreditCard("Bob Smith", card.c_str(), "12", "2014"); |
- ASSERT_EQ(0u, |
- InfoBarService::FromWebContents( |
- browser()->tab_strip_model()->GetActiveWebContents())-> |
- infobar_count()); |
+ InfoBarService* infobar_service = InfoBarService::FromWebContents( |
+ browser()->tab_strip_model()->GetActiveWebContents()); |
+ ASSERT_EQ(0u, infobar_service->infobar_manager().infobar_count()); |
} |
// Test whitespaces and separator chars are stripped for valid CC numbers. |
@@ -675,10 +679,9 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, CCInfoNotStoredWhenAutocompleteOff) { |
data["CREDIT_CARD_EXP_4_DIGIT_YEAR"] = "2014"; |
FillFormAndSubmit("cc_autocomplete_off_test.html", data); |
- ASSERT_EQ(0u, |
- InfoBarService::FromWebContents( |
- browser()->tab_strip_model()->GetActiveWebContents())-> |
- infobar_count()); |
+ InfoBarService* infobar_service = InfoBarService::FromWebContents( |
+ browser()->tab_strip_model()->GetActiveWebContents()); |
+ ASSERT_EQ(0u, infobar_service->infobar_manager().infobar_count()); |
} |
// Test profile not aggregated if email found in non-email field. |