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

Unified Diff: chrome/browser/task_manager/task_manager_browsertest.cc

Issue 7810002: Move infobar handling to a tab helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 4 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/task_manager/task_manager_browsertest.cc
diff --git a/chrome/browser/task_manager/task_manager_browsertest.cc b/chrome/browser/task_manager/task_manager_browsertest.cc
index 2fe1ad429a895543709c925ce4bea3290a36f849..fa9369ae71c00d60ce2d4b158f2191aa8990bbfa 100644
--- a/chrome/browser/task_manager/task_manager_browsertest.cc
+++ b/chrome/browser/task_manager/task_manager_browsertest.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_test_util.h"
@@ -373,10 +374,11 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest,
// Reload the extension using the "crashed extension" infobar while the task
// manager is still visible. Make sure we don't crash and the extension
// gets reloaded and noticed in the task manager.
- TabContentsWrapper* current_tab = browser()->GetSelectedTabContentsWrapper();
- ASSERT_EQ(1U, current_tab->infobar_count());
- ConfirmInfoBarDelegate* delegate =
- current_tab->GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate();
+ InfoBarTabHelper* infobar_helper =
+ browser()->GetSelectedTabContentsWrapper()->infobar_tab_helper();
+ ASSERT_EQ(1U, infobar_helper->infobar_count());
+ ConfirmInfoBarDelegate* delegate = infobar_helper->
+ GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate();
ASSERT_TRUE(delegate);
delegate->Accept();
TaskManagerBrowserTestUtil::WaitForResourceChange(3);
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_ssl_helper.cc ('k') | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698