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

Unified Diff: chrome/test/ppapi/ppapi_test.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/test/ppapi/ppapi_test.cc
diff --git a/chrome/test/ppapi/ppapi_test.cc b/chrome/test/ppapi/ppapi_test.cc
index 30fc4c8923de0e094ea83be94cc5bdf4ccda7659..0ec1edaf05d85bfbc6510622b2b75eaaab9490f5 100644
--- a/chrome/test/ppapi/ppapi_test.cc
+++ b/chrome/test/ppapi/ppapi_test.cc
@@ -13,6 +13,8 @@
#include "chrome/browser/content_settings/host_content_settings_map.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"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -116,13 +118,14 @@ void PPAPITestBase::InfoBarObserver::VerifyInfoBarState() {
InfoBarService* infobar_service =
InfoBarService::FromWebContents(web_contents);
ASSERT_TRUE(infobar_service != NULL);
+ InfoBarManager& infobar_manager = infobar_service->infobar_manager();
- EXPECT_EQ(expecting_infobar_ ? 1U : 0U, infobar_service->infobar_count());
+ EXPECT_EQ(expecting_infobar_ ? 1U : 0U, infobar_manager.infobar_count());
if (!expecting_infobar_)
return;
expecting_infobar_ = false;
- InfoBar* infobar = infobar_service->infobar_at(0);
+ InfoBar* infobar = infobar_manager.infobar_at(0);
ConfirmInfoBarDelegate* delegate =
infobar->delegate()->AsConfirmInfoBarDelegate();
ASSERT_TRUE(delegate != NULL);
@@ -131,7 +134,7 @@ void PPAPITestBase::InfoBarObserver::VerifyInfoBarState() {
else
delegate->Cancel();
- infobar_service->RemoveInfoBar(infobar);
+ infobar_manager.RemoveInfoBar(infobar);
}
PPAPITestBase::PPAPITestBase() {

Powered by Google App Engine
This is Rietveld 408576698