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

Unified Diff: chrome/browser/extensions/extension_crash_recovery_browsertest.cc

Issue 12066003: Remove TabStripModel wrapper use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gtk Created 7 years, 11 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/extensions/extension_crash_recovery_browsertest.cc
diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
index 58998b6dafd5f9e9fda50b0ebd3911222d811438..6b9576a61da9e0767689058676a0db301db88ab7 100644
--- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
+++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
@@ -18,7 +18,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
-#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/navigation_controller.h"
@@ -178,7 +177,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, ReloadIndependently) {
SCOPED_TRACE("after reloading");
CheckExtensionConsistency(first_extension_id_);
- WebContents* current_tab = chrome::GetActiveWebContents(browser());
+ WebContents* current_tab =
+ browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(current_tab);
// The balloon should automatically hide after the extension is successfully
@@ -193,13 +193,15 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
CrashExtension(first_extension_id_);
ASSERT_EQ(size_before, GetExtensionService()->extensions()->size());
- WebContents* original_tab = chrome::GetActiveWebContents(browser());
+ WebContents* original_tab =
+ browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(original_tab);
ASSERT_EQ(1U, CountBalloons());
// Open a new tab, but the balloon will still be there.
chrome::NewTab(browser());
- WebContents* new_current_tab = chrome::GetActiveWebContents(browser());
+ WebContents* new_current_tab =
+ browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(new_current_tab);
ASSERT_NE(new_current_tab, original_tab);
ASSERT_EQ(1U, CountBalloons());
@@ -221,7 +223,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
CrashExtension(first_extension_id_);
ASSERT_EQ(size_before, GetExtensionService()->extensions()->size());
- WebContents* current_tab = chrome::GetActiveWebContents(browser());
+ WebContents* current_tab =
+ browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(current_tab);
ASSERT_EQ(1U, CountBalloons());
@@ -394,7 +397,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
{
SCOPED_TRACE("first: reload");
- WebContents* current_tab = chrome::GetActiveWebContents(browser());
+ WebContents* current_tab =
+ browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(current_tab);
// At the beginning we should have one balloon displayed for each extension.
ASSERT_EQ(2U, CountBalloons());
@@ -494,7 +498,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
content::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &chrome::GetActiveWebContents(browser())->GetController()));
+ &browser()->tab_strip_model()->GetActiveWebContents()->
+ GetController()));
chrome::Reload(browser(), CURRENT_TAB);
observer.Wait();
}

Powered by Google App Engine
This is Rietveld 408576698