| 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..26fe234d029b3afd0d6d985a8b1d6d5288b673db 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,12 @@ class WindowedPersonalDataManagerObserver
|
| }
|
|
|
| virtual ~WindowedPersonalDataManagerObserver() {
|
| - if (infobar_service_ && (infobar_service_->infobar_count() > 0))
|
| - infobar_service_->RemoveInfoBar(infobar_service_->infobar_at(0));
|
| + if (!infobar_service_)
|
| + return;
|
| +
|
| + InfoBarManager& infobar_manager = infobar_service_->infobar_manager();
|
| + if (infobar_manager.infobar_count() > 0)
|
| + infobar_manager.RemoveInfoBar(infobar_manager.infobar_at(0));
|
| }
|
|
|
| void Wait() {
|
| @@ -104,7 +109,10 @@ class WindowedPersonalDataManagerObserver
|
| infobar_service_ = InfoBarService::FromWebContents(
|
| browser_->tab_strip_model()->GetActiveWebContents());
|
| ConfirmInfoBarDelegate* infobar_delegate =
|
| - infobar_service_->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate();
|
| + infobar_service_->infobar_manager()
|
| + .infobar_at(0)
|
| + ->delegate()
|
| + ->AsConfirmInfoBarDelegate();
|
| ASSERT_TRUE(infobar_delegate);
|
| infobar_delegate->Accept();
|
| }
|
| @@ -490,8 +498,9 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, InvalidCreditCardNumberIsNotAggregated) {
|
| SubmitCreditCard("Bob Smith", card.c_str(), "12", "2014");
|
| ASSERT_EQ(0u,
|
| InfoBarService::FromWebContents(
|
| - browser()->tab_strip_model()->GetActiveWebContents())->
|
| - infobar_count());
|
| + browser()->tab_strip_model()->GetActiveWebContents())
|
| + ->infobar_manager()
|
| + .infobar_count());
|
| }
|
|
|
| // Test whitespaces and separator chars are stripped for valid CC numbers.
|
| @@ -677,8 +686,9 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, CCInfoNotStoredWhenAutocompleteOff) {
|
|
|
| ASSERT_EQ(0u,
|
| InfoBarService::FromWebContents(
|
| - browser()->tab_strip_model()->GetActiveWebContents())->
|
| - infobar_count());
|
| + browser()->tab_strip_model()->GetActiveWebContents())
|
| + ->infobar_manager()
|
| + .infobar_count());
|
| }
|
|
|
| // Test profile not aggregated if email found in non-email field.
|
|
|