Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6701)

Unified Diff: chrome/browser/translate/translate_browsertest.cc

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698