| Index: chrome/browser/autofill/autofill_browsertest.cc
|
| ===================================================================
|
| --- chrome/browser/autofill/autofill_browsertest.cc (revision 195254)
|
| +++ chrome/browser/autofill/autofill_browsertest.cc (working copy)
|
| @@ -137,14 +137,8 @@
|
| }
|
|
|
| virtual ~WindowedPersonalDataManagerObserver() {
|
| - if (!infobar_service_)
|
| - return;
|
| -
|
| - InfoBarDelegate* infobar = NULL;
|
| - if (infobar_service_->GetInfoBarCount() > 0 &&
|
| - (infobar = infobar_service_->GetInfoBarDelegateAt(0))) {
|
| - infobar_service_->RemoveInfoBar(infobar);
|
| - }
|
| + if (infobar_service_ && infobar_service_->infobar_count() > 0)
|
| + infobar_service_->RemoveInfoBar(infobar_service_->infobar_at(0));
|
| }
|
|
|
| void Wait() {
|
| @@ -176,7 +170,7 @@
|
| // Accept in the infobar.
|
| infobar_service_ = InfoBarService::FromWebContents(
|
| browser_->tab_strip_model()->GetActiveWebContents());
|
| - InfoBarDelegate* infobar = infobar_service_->GetInfoBarDelegateAt(0);
|
| + InfoBarDelegate* infobar = infobar_service_->infobar_at(0);
|
|
|
| ConfirmInfoBarDelegate* confirm_infobar =
|
| infobar->AsConfirmInfoBarDelegate();
|
| @@ -960,8 +954,8 @@
|
| render_view_host(),
|
| ChromeViewHostMsg_TranslateLanguageDetermined(0, "ja", true));
|
| TranslateInfoBarDelegate* infobar = InfoBarService::FromWebContents(
|
| - browser()->tab_strip_model()->GetActiveWebContents())->
|
| - GetInfoBarDelegateAt(0)->AsTranslateInfoBarDelegate();
|
| + browser()->tab_strip_model()->GetActiveWebContents())->infobar_at(0)->
|
| + AsTranslateInfoBarDelegate();
|
|
|
| ASSERT_TRUE(infobar != NULL);
|
| EXPECT_EQ(TranslateInfoBarDelegate::BEFORE_TRANSLATE,
|
| @@ -1195,7 +1189,7 @@
|
| ASSERT_EQ(0u,
|
| InfoBarService::FromWebContents(
|
| browser()->tab_strip_model()->GetActiveWebContents())->
|
| - GetInfoBarCount());
|
| + infobar_count());
|
| }
|
|
|
| // Test whitespaces and separator chars are stripped for valid CC numbers.
|
| @@ -1418,7 +1412,7 @@
|
| ASSERT_EQ(0u,
|
| InfoBarService::FromWebContents(
|
| browser()->tab_strip_model()->GetActiveWebContents())->
|
| - GetInfoBarCount());
|
| + infobar_count());
|
| }
|
|
|
| // http://crbug.com/150084
|
|
|