Skip to content

Commit

Permalink
Reenable InstallApps attempt chromium#2. This time with a fix to
Browse files Browse the repository at this point in the history
ManifestTest.AppsDisabledByDefault.

Don't cache the value of the CommandLine, since unit_tests can modify it while
the process is running.

BUG=41280

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49809 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
mpcomplete@chromium.org committed Jun 15, 2010
1 parent a866cc2 commit 669ee49
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions chrome/browser/extensions/extensions_service_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -962,9 +962,7 @@ TEST_F(ExtensionsServiceTest, InstallTheme) {
ValidatePrefKeyCount(pref_count);
}

// TODO(mpcomplete): temporarily disabled while I fix the test on linux.
// http://code.google.com/p/chromium/issues/detail?id=41280
TEST_F(ExtensionsServiceTest, DISABLED_InstallApps) {
TEST_F(ExtensionsServiceTest, InstallApps) {
InitializeEmptyExtensionsService();
FilePath extensions_path;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path));
Expand Down
4 changes: 1 addition & 3 deletions chrome/common/extensions/extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -934,9 +934,7 @@ bool Extension::AppsAreEnabled() {
#if defined(OS_CHROMEOS)
return true;
#else
static bool apps_enabled_mode =
CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps);
return apps_enabled_mode;
return CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps);
#endif
}

Expand Down
3 changes: 1 addition & 2 deletions chrome/common/extensions/extension_manifests_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ class ManifestTest : public testing::Test {

scoped_ptr<Extension> extension(new Extension(path.DirName()));
extension->set_location(location);
if (enable_apps_)
extension->set_apps_enabled(true);
extension->set_apps_enabled(enable_apps_);

if (!extension->InitFromValue(*value, false, error))
return NULL;
Expand Down

0 comments on commit 669ee49

Please sign in to comment.