| Index: chrome/browser/translate/translate_browsertest.cc
|
| ===================================================================
|
| --- chrome/browser/translate/translate_browsertest.cc (revision 226624)
|
| +++ chrome/browser/translate/translate_browsertest.cc (working copy)
|
| @@ -7,6 +7,7 @@
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| +#include "chrome/browser/infobars/infobar.h"
|
| #include "chrome/browser/infobars/infobar_service.h"
|
| #include "chrome/browser/translate/translate_infobar_delegate.h"
|
| #include "chrome/browser/translate/translate_script.h"
|
| @@ -79,7 +80,7 @@
|
| infobar_service_ = InfoBarService::FromWebContents(web_contents);
|
| }
|
| if (!infobar_service_) {
|
| - EXPECT_TRUE(false) << "infobar service is not available";
|
| + ADD_FAILURE() << "infobar service is not available";
|
| return NULL;
|
| }
|
|
|
| @@ -89,13 +90,13 @@
|
| // |kTranslateSecurityOrigin| flag specified in SetUpCommandLine().
|
| // This infobar appears in all tests of TranslateBrowserTest and can be
|
| // ignored here.
|
| - ConfirmInfoBarDelegate* confirm =
|
| - infobar_service_->infobar_at(i)->AsConfirmInfoBarDelegate();
|
| + ConfirmInfoBarDelegate* confirm = infobar_service_->infobar_at(i)->
|
| + delegate()->AsConfirmInfoBarDelegate();
|
| if (confirm)
|
| continue;
|
|
|
| - TranslateInfoBarDelegate* translate =
|
| - infobar_service_->infobar_at(i)->AsTranslateInfoBarDelegate();
|
| + TranslateInfoBarDelegate* translate = infobar_service_->infobar_at(i)->
|
| + delegate()->AsTranslateInfoBarDelegate();
|
| if (translate) {
|
| EXPECT_FALSE(delegate) << "multiple infobars are shown unexpectedly";
|
| delegate = translate;
|
|
|