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

Unified Diff: chrome/browser/autofill/autofill_interactive_uitest.cc

Issue 190063006: Infobar Componentization Proof of Concept (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixes Created 6 years, 9 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/autofill/autofill_interactive_uitest.cc
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc
index 670798693baefd241b2e56f13dd776ab1d98fbad..236b7ba73bb83b762e34b3a4dc34e9eaa4e5fa18 100644
--- a/chrome/browser/autofill/autofill_interactive_uitest.cc
+++ b/chrome/browser/autofill/autofill_interactive_uitest.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/translate/translate_infobar_delegate.h"
@@ -146,8 +147,9 @@ class WindowedPersonalDataManagerObserver
virtual ~WindowedPersonalDataManagerObserver() {
if (infobar_service_) {
- while (infobar_service_->infobar_count() > 0) {
- infobar_service_->RemoveInfoBar(infobar_service_->infobar_at(0));
+ InfoBarManager& infobar_manager = infobar_service_->infobar_manager();
+ while (infobar_manager.infobar_count() > 0) {
+ infobar_manager.RemoveInfoBar(infobar_manager.infobar_at(0));
}
}
}
@@ -171,8 +173,11 @@ class WindowedPersonalDataManagerObserver
const content::NotificationDetails& details) OVERRIDE {
infobar_service_ = InfoBarService::FromWebContents(
browser_->tab_strip_model()->GetActiveWebContents());
- infobar_service_->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate()->
- Accept();
+ infobar_service_->infobar_manager()
+ .infobar_at(0)
+ ->delegate()
+ ->AsConfirmInfoBarDelegate()
+ ->Accept();
}
void Wait() {
@@ -838,8 +843,11 @@ IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, AutofillAfterTranslate) {
// Wait for the translation bar to appear and get it.
infobar_observer.Wait();
TranslateInfoBarDelegate* delegate =
- InfoBarService::FromWebContents(GetWebContents())->infobar_at(0)->
- delegate()->AsTranslateInfoBarDelegate();
+ InfoBarService::FromWebContents(GetWebContents())
+ ->infobar_manager()
+ .infobar_at(0)
+ ->delegate()
+ ->AsTranslateInfoBarDelegate();
ASSERT_TRUE(delegate);
EXPECT_EQ(TranslateTabHelper::BEFORE_TRANSLATE, delegate->translate_step());

Powered by Google App Engine
This is Rietveld 408576698