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

Unified Diff: chrome/browser/policy/policy_browsertest.cc

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years 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
« no previous file with comments | « chrome/browser/plugins/plugin_infobar_delegates.cc ('k') | chrome/browser/ssl/ssl_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/policy_browsertest.cc
===================================================================
--- chrome/browser/policy/policy_browsertest.cc (revision 238220)
+++ chrome/browser/policy/policy_browsertest.cc (working copy)
@@ -39,6 +39,7 @@
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
+#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
#include "chrome/browser/media/media_stream_devices_controller.h"
@@ -1313,7 +1314,8 @@
ui_test_utils::NavigateToURL(browser(), url);
// This should have triggered the dangerous plugin infobar.
ASSERT_EQ(1u, infobar_service->infobar_count());
- EXPECT_TRUE(infobar_service->infobar_at(0)->AsConfirmInfoBarDelegate());
+ EXPECT_TRUE(
+ infobar_service->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate());
// And the plugin isn't running.
EXPECT_EQ(0, CountPlugins());
@@ -1876,9 +1878,9 @@
// Verify that the translate infobar showed up.
ASSERT_EQ(1u, infobar_service->infobar_count());
- InfoBarDelegate* infobar = infobar_service->infobar_at(0);
+ InfoBar* infobar = infobar_service->infobar_at(0);
TranslateInfoBarDelegate* translate_infobar_delegate =
- infobar->AsTranslateInfoBarDelegate();
+ infobar->delegate()->AsTranslateInfoBarDelegate();
ASSERT_TRUE(translate_infobar_delegate);
EXPECT_EQ(TranslateInfoBarDelegate::BEFORE_TRANSLATE,
translate_infobar_delegate->infobar_type());
« no previous file with comments | « chrome/browser/plugins/plugin_infobar_delegates.cc ('k') | chrome/browser/ssl/ssl_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698