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

Unified Diff: chrome/browser/extensions/extension_install_ui_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_install_ui_browsertest.cc
===================================================================
--- chrome/browser/extensions/extension_install_ui_browsertest.cc (revision 145001)
+++ chrome/browser/extensions/extension_install_ui_browsertest.cc (working copy)
@@ -10,6 +10,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/browser/themes/theme_service_factory.h"
@@ -24,7 +25,7 @@
// Checks that a theme info bar is currently visible and issues an undo to
// revert to the previous theme.
void VerifyThemeInfoBarAndUndoInstall() {
- TabContents* tab = browser()->GetActiveTabContents();
+ TabContents* tab = chrome::GetActiveTabContents(browser());
ASSERT_TRUE(tab);
InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper();
ASSERT_EQ(1U, infobar_helper->infobar_count());
@@ -50,7 +51,7 @@
IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest,
MAYBE_TestThemeInstallUndoResetsToDefault) {
- ui_test_utils::CloseAllInfoBars(browser()->GetActiveTabContents());
+ ui_test_utils::CloseAllInfoBars(chrome::GetActiveTabContents(browser()));
// Install theme once and undo to verify we go back to default theme.
FilePath theme_crx = PackExtension(test_data_dir_.AppendASCII("theme"));
@@ -79,7 +80,7 @@
IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest,
TestThemeInstallUndoResetsToPreviousTheme) {
- ui_test_utils::CloseAllInfoBars(browser()->GetActiveTabContents());
+ ui_test_utils::CloseAllInfoBars(chrome::GetActiveTabContents(browser()));
// Install first theme.
FilePath theme_path = test_data_dir_.AppendASCII("theme");
@@ -109,7 +110,7 @@
if (NewTabUI::ShouldShowApps()) {
EXPECT_EQ(num_tabs + 1, browser()->tab_count());
- WebContents* web_contents = browser()->GetActiveWebContents();
+ WebContents* web_contents = chrome::GetActiveWebContents(browser());
ASSERT_TRUE(web_contents);
EXPECT_TRUE(StartsWithASCII(web_contents->GetURL().spec(),
"chrome://newtab/", false));
@@ -134,7 +135,7 @@
EXPECT_EQ(num_incognito_tabs, incognito_browser->tab_count());
if (NewTabUI::ShouldShowApps()) {
EXPECT_EQ(num_normal_tabs + 1, browser()->tab_count());
- WebContents* web_contents = browser()->GetActiveWebContents();
+ WebContents* web_contents = chrome::GetActiveWebContents(browser());
ASSERT_TRUE(web_contents);
EXPECT_TRUE(StartsWithASCII(web_contents->GetURL().spec(),
"chrome://newtab/", false));
« no previous file with comments | « chrome/browser/extensions/extension_incognito_apitest.cc ('k') | chrome/browser/extensions/extension_install_ui_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698