diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-15 21:50:01 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-15 21:50:01 +0000 |
commit | 32fc4ff7d286f7a6ee80d969672cdadaa8d3e8d0 (patch) | |
tree | c7e59d81962c173d61083003c07819c2805fd042 /chrome/browser/extensions/extension_install_ui_browsertest.cc | |
parent | 080245fa243e0c04ccea332660d3058f710a090c (diff) | |
download | chromium_src-32fc4ff7d286f7a6ee80d969672cdadaa8d3e8d0.zip chromium_src-32fc4ff7d286f7a6ee80d969672cdadaa8d3e8d0.tar.gz chromium_src-32fc4ff7d286f7a6ee80d969672cdadaa8d3e8d0.tar.bz2 |
Remove BrowserList::GetLastActive from extensions install dialog code by plumbing through the Browser window. In two places (file_manager_util.cc and download_crx_util.cc) there is no context so I left those with FindLastActiveWithProfile for now.
BUG=129187
Review URL: https://chromiumcodereview.appspot.com/10548057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142489 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_install_ui_browsertest.cc')
-rw-r--r-- | chrome/browser/extensions/extension_install_ui_browsertest.cc | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/chrome/browser/extensions/extension_install_ui_browsertest.cc b/chrome/browser/extensions/extension_install_ui_browsertest.cc index cd67eb9..c739b23 100644 --- a/chrome/browser/extensions/extension_install_ui_browsertest.cc +++ b/chrome/browser/extensions/extension_install_ui_browsertest.cc @@ -64,8 +64,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest, // Install theme once and undo to verify we go back to default theme. FilePath theme_crx = PackExtension(test_data_dir_.AppendASCII("theme")); - ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( - theme_crx, 1, browser()->profile())); + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(theme_crx, 1, browser())); const Extension* theme = GetTheme(); ASSERT_TRUE(theme); std::string theme_id = theme->id(); @@ -76,13 +75,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest, // We set the |expected_change| to zero in these 'InstallExtensionWithUI' // calls since the theme has already been installed above and this is an // overinstall to set the active theme. - ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( - theme_crx, 0, browser()->profile())); + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(theme_crx, 0, browser())); theme = GetTheme(); ASSERT_TRUE(theme); ASSERT_EQ(theme_id, theme->id()); - ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( - theme_crx, 0, browser()->profile())); + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(theme_crx, 0, browser())); theme = GetTheme(); ASSERT_TRUE(theme); ASSERT_EQ(theme_id, theme->id()); @@ -96,16 +93,14 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest, // Install first theme. FilePath theme_path = test_data_dir_.AppendASCII("theme"); - ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( - theme_path, 1, browser()->profile())); + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(theme_path, 1, browser())); const Extension* theme = GetTheme(); ASSERT_TRUE(theme); std::string theme_id = theme->id(); // Then install second theme. FilePath theme_path2 = test_data_dir_.AppendASCII("theme2"); - ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( - theme_path2, 1, browser()->profile())); + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(theme_path2, 1, browser())); const Extension* theme2 = GetTheme(); ASSERT_TRUE(theme2); EXPECT_FALSE(theme_id == theme2->id()); @@ -120,8 +115,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest, int num_tabs = browser()->tab_count(); FilePath app_dir = test_data_dir_.AppendASCII("app"); - ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(app_dir, 1, - browser()->profile())); + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(app_dir, 1, browser())); if (NewTabUI::ShouldShowApps()) { EXPECT_EQ(num_tabs + 1, browser()->tab_count()); @@ -145,7 +139,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest, FilePath app_dir = test_data_dir_.AppendASCII("app"); ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(app_dir, 1, - incognito_profile)); + incognito_browser)); EXPECT_EQ(num_incognito_tabs, incognito_browser->tab_count()); if (NewTabUI::ShouldShowApps()) { |