Commit 240cc92a authored by aa@chromium.org's avatar aa@chromium.org

Fix broken ExtensionCrxInstallerTest.GalleryInstallGetsExperimental test.

Not sure what happened here, but I felt dirty when I checked that
crx in the first time, so just removed it.

BUG=105728

Review URL: http://codereview.chromium.org/8741004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112367 0039d316-1c4b-4281-b951-d872f2087c98
parent e9355c51
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/ui_test_utils.h" #include "chrome/test/base/ui_test_utils.h"
class SkBitmap; class SkBitmap;
...@@ -77,9 +78,20 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, Whitelisting) { ...@@ -77,9 +78,20 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, Whitelisting) {
// crbug.com/105728: Fails because the CRX is invalid. // crbug.com/105728: Fails because the CRX is invalid.
IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest,
FAILS_GalleryInstallGetsExperimental) { GalleryInstallGetsExperimental) {
ASSERT_FALSE(InstallExtension( // We must modify the command line temporarily in order to pack an extension
test_data_dir_.AppendASCII("experimental.crx"), 0)); // that requests the experimental permission.
ASSERT_TRUE(InstallExtensionFromWebstore( CommandLine* command_line = CommandLine::ForCurrentProcess();
test_data_dir_.AppendASCII("experimental.crx"), 1)); CommandLine old_command_line = *command_line;
command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
FilePath crx_path = PackExtension(
test_data_dir_.AppendASCII("experimental"));
ASSERT_FALSE(crx_path.empty());
// Now reset the command line so that we are testing specifically whether
// installing from webstore enables experimental permissions.
*(CommandLine::ForCurrentProcess()) = old_command_line;
EXPECT_FALSE(InstallExtension(crx_path, 0));
EXPECT_TRUE(InstallExtensionFromWebstore(crx_path, 1));
} }
{
"name": "experimental test",
"version": "1",
"manifest_version": 2,
"permissions": ["experimental"]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment