Chromium Code Reviews| Index: chrome/browser/extensions/activity_log/activity_log_unittest.cc |
| diff --git a/chrome/browser/extensions/activity_log/activity_log_unittest.cc b/chrome/browser/extensions/activity_log/activity_log_unittest.cc |
| index 4a7958e41018b6db21d5690b1e49ae5b2754a59d..cd6b7da82b86523818159c65ce207ad87ec1d01f 100644 |
| --- a/chrome/browser/extensions/activity_log/activity_log_unittest.cc |
| +++ b/chrome/browser/extensions/activity_log/activity_log_unittest.cc |
| @@ -40,24 +40,19 @@ namespace extensions { |
| class ActivityLogTest : public ChromeRenderViewHostTestHarness { |
| protected: |
| - ActivityLogTest() : saved_cmdline_(CommandLine::NO_PROGRAM) {} |
| - |
| virtual void SetUp() OVERRIDE { |
| ChromeRenderViewHostTestHarness::SetUp(); |
| #if defined OS_CHROMEOS |
| test_user_manager_.reset(new chromeos::ScopedTestUserManager()); |
| #endif |
| CommandLine command_line(CommandLine::NO_PROGRAM); |
| - saved_cmdline_ = *CommandLine::ForCurrentProcess(); |
|
felt
2013/07/23 06:37:34
why did you remove this? we're still mucking aroun
pmarch
2013/07/29 17:36:47
Comment below says saved_cmdline_ is used to prese
felt
2013/07/29 19:29:42
Ahh, I see, the problem was being caused by Recomp
|
| CommandLine::ForCurrentProcess()->AppendSwitch( |
| switches::kEnableExtensionActivityLogging); |
| CommandLine::ForCurrentProcess()->AppendSwitch( |
| switches::kEnableExtensionActivityLogTesting); |
| - ActivityLog::RecomputeLoggingIsEnabled(true); // Logging now enabled. |
| extension_service_ = static_cast<TestExtensionSystem*>( |
| ExtensionSystem::Get(profile()))->CreateExtensionService |
| (&command_line, base::FilePath(), false); |
| - ActivityLog::GetInstance(profile())->Init(); |
| base::RunLoop().RunUntilIdle(); |
| } |
| @@ -67,8 +62,6 @@ class ActivityLogTest : public ChromeRenderViewHostTestHarness { |
| #endif |
| base::RunLoop().RunUntilIdle(); |
| // Restore the original command line and undo the affects of SetUp(). |
|
felt
2013/07/29 21:05:23
PS please kill the comment too if removing the cod
pmarch
2013/08/08 14:42:42
Done.
|
| - *CommandLine::ForCurrentProcess() = saved_cmdline_; |
| - ActivityLog::RecomputeLoggingIsEnabled(false); // Logging now disabled. |
| ChromeRenderViewHostTestHarness::TearDown(); |
| } |
| @@ -135,11 +128,6 @@ class ActivityLogTest : public ChromeRenderViewHostTestHarness { |
| } |
| ExtensionService* extension_service_; |
| - // Used to preserve a copy of the original command line. |
| - // The test framework will do this itself as well. However, by then, |
| - // it is too late to call ActivityLog::RecomputeLoggingIsEnabled() in |
| - // TearDown(). |
| - CommandLine saved_cmdline_; |
| #if defined OS_CHROMEOS |
| chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
| @@ -148,10 +136,6 @@ class ActivityLogTest : public ChromeRenderViewHostTestHarness { |
| #endif |
| }; |
| -TEST_F(ActivityLogTest, Enabled) { |
| - ASSERT_TRUE(ActivityLog::IsLogEnabledOnAnyProfile()); |
| -} |
| - |
| TEST_F(ActivityLogTest, Construct) { |
| ActivityLog* activity_log = ActivityLog::GetInstance(profile()); |
| scoped_ptr<base::ListValue> args(new base::ListValue()); |