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

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

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
===================================================================
--- chrome/browser/extensions/extension_crash_recovery_browsertest.cc (revision 145001)
+++ chrome/browser/extensions/extension_crash_recovery_browsertest.cc (working copy)
@@ -17,6 +17,7 @@
#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/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -176,7 +177,7 @@
SCOPED_TRACE("after reloading");
CheckExtensionConsistency(first_extension_id_);
- WebContents* current_tab = browser()->GetActiveWebContents();
+ WebContents* current_tab = chrome::GetActiveWebContents(browser());
ASSERT_TRUE(current_tab);
// The balloon should automatically hide after the extension is successfully
@@ -191,13 +192,13 @@
CrashExtension(first_extension_id_);
ASSERT_EQ(size_before, GetExtensionService()->extensions()->size());
- WebContents* original_tab = browser()->GetActiveWebContents();
+ WebContents* original_tab = chrome::GetActiveWebContents(browser());
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 = browser()->GetActiveWebContents();
+ WebContents* new_current_tab = chrome::GetActiveWebContents(browser());
ASSERT_TRUE(new_current_tab);
ASSERT_NE(new_current_tab, original_tab);
ASSERT_EQ(1U, CountBalloons());
@@ -219,7 +220,7 @@
CrashExtension(first_extension_id_);
ASSERT_EQ(size_before, GetExtensionService()->extensions()->size());
- WebContents* current_tab = browser()->GetActiveWebContents();
+ WebContents* current_tab = chrome::GetActiveWebContents(browser());
ASSERT_TRUE(current_tab);
ASSERT_EQ(1U, CountBalloons());
@@ -392,7 +393,7 @@
{
SCOPED_TRACE("first: reload");
- WebContents* current_tab = browser()->GetActiveWebContents();
+ WebContents* current_tab = chrome::GetActiveWebContents(browser());
ASSERT_TRUE(current_tab);
// At the beginning we should have one balloon displayed for each extension.
ASSERT_EQ(2U, CountBalloons());
@@ -485,7 +486,7 @@
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &browser()->GetActiveWebContents()->GetController()));
+ &chrome::GetActiveWebContents(browser())->GetController()));
chrome::Reload(browser(), CURRENT_TAB);
observer.Wait();
}

Powered by Google App Engine
This is Rietveld 408576698