diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-27 18:06:22 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-27 18:06:22 +0000 |
commit | 7fb4bbb28abdfa66893f863f85e74e35ae1f75d5 (patch) | |
tree | eadd4ae4b766958d6980351cea4a242f7a4d8336 /chrome/browser/extensions/extension_install_ui_browsertest.cc | |
parent | bc4ade2129b3d7464b36bc480e607b92ff3eb9ec (diff) | |
download | chromium_src-7fb4bbb28abdfa66893f863f85e74e35ae1f75d5.zip chromium_src-7fb4bbb28abdfa66893f863f85e74e35ae1f75d5.tar.gz chromium_src-7fb4bbb28abdfa66893f863f85e74e35ae1f75d5.tar.bz2 |
Improve the UI for disabling off-store extension install.
Move the check later into install so that:
1) The download bar goes away.
2) There's an error message.
3) The same thing happens when double-clicking a crx, on systems that associate crx with Chrome.
Also, made themes exempt from this policy since there is no danger in installing a theme. This left themes with a dangerous download bar that said 'Installing extensions, themes, and apps can harm your computer', which isn't even true for themes. It was only there to protect against clickjacking. Removed that and replaced with standard install dialog.
Had to update a bunch of strings.
BUG=55584
TEST=Run chrome with --enable-off-store-extension-install=0, navigate to a crx file. Should see error dialog.
TBR=sky
Review URL: https://chromiumcodereview.appspot.com/10452009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139217 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 | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/chrome/browser/extensions/extension_install_ui_browsertest.cc b/chrome/browser/extensions/extension_install_ui_browsertest.cc index 29415c5..2ce29c7 100644 --- a/chrome/browser/extensions/extension_install_ui_browsertest.cc +++ b/chrome/browser/extensions/extension_install_ui_browsertest.cc @@ -52,7 +52,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest, MAYBE_TestThemeInstallUndoResetsToDefault) { // Install theme once and undo to verify we go back to default theme. FilePath theme_crx = PackExtension(test_data_dir_.AppendASCII("theme")); - ASSERT_TRUE(InstallExtensionWithUI(theme_crx, 1)); + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( + theme_crx, 1, browser()->profile())); const Extension* theme = GetTheme(); ASSERT_TRUE(theme); std::string theme_id = theme->id(); @@ -63,11 +64,13 @@ 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(InstallExtensionWithUI(theme_crx, 0)); + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( + theme_crx, 0, browser()->profile())); theme = GetTheme(); ASSERT_TRUE(theme); ASSERT_EQ(theme_id, theme->id()); - ASSERT_TRUE(InstallExtensionWithUI(theme_crx, 0)); + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( + theme_crx, 0, browser()->profile())); theme = GetTheme(); ASSERT_TRUE(theme); ASSERT_EQ(theme_id, theme->id()); @@ -79,14 +82,16 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest, TestThemeInstallUndoResetsToPreviousTheme) { // Install first theme. FilePath theme_path = test_data_dir_.AppendASCII("theme"); - ASSERT_TRUE(InstallExtensionWithUI(theme_path, 1)); + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( + theme_path, 1, browser()->profile())); 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(InstallExtensionWithUI(theme_path2, 1)); + ASSERT_TRUE(InstallExtensionWithUIAutoConfirm( + theme_path2, 1, browser()->profile())); const Extension* theme2 = GetTheme(); ASSERT_TRUE(theme2); EXPECT_FALSE(theme_id == theme2->id()); |