Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Unified Diff: trunk/src/chrome/browser/extensions/activity_log/activity_log_unittest.cc

Issue 16756004: Revert 205059 "We were seeing ActivityLog memory leaks and assor..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: trunk/src/chrome/browser/extensions/activity_log/activity_log_unittest.cc
===================================================================
--- trunk/src/chrome/browser/extensions/activity_log/activity_log_unittest.cc (revision 205306)
+++ trunk/src/chrome/browser/extensions/activity_log/activity_log_unittest.cc (working copy)
@@ -57,6 +57,9 @@
ExtensionSystem::Get(profile_.get()))->CreateExtensionService
(&command_line, base::FilePath(), false);
ActivityLog::RecomputeLoggingIsEnabled(false);
+ extension_service_ = static_cast<TestExtensionSystem*>(
+ ExtensionSystem::Get(profile_.get()))->CreateExtensionService(
+ &command_line, base::FilePath(), false);
}
virtual ~ActivityLogTest() {
@@ -172,6 +175,14 @@
}
TEST_F(ActivityLogTest, Construct) {
+ scoped_refptr<const Extension> extension =
+ ExtensionBuilder()
+ .SetManifest(DictionaryBuilder()
+ .Set("name", "Test extension")
+ .Set("version", "1.0.0")
+ .Set("manifest_version", 2))
+ .Build();
+ extension_service_->AddExtension(extension);
ActivityLog* activity_log = ActivityLog::GetInstance(profile_.get());
scoped_ptr<ListValue> args(new ListValue());
ASSERT_TRUE(activity_log->IsLogEnabled());
@@ -215,6 +226,14 @@
}
TEST_F(ActivityLogTest, LogWithArguments) {
+ scoped_refptr<const Extension> extension =
+ ExtensionBuilder()
+ .SetManifest(DictionaryBuilder()
+ .Set("name", "Test extension")
+ .Set("version", "1.0.0")
+ .Set("manifest_version", 2))
+ .Build();
+ extension_service_->AddExtension(extension);
ActivityLog* activity_log = ActivityLog::GetInstance(profile_.get());
ASSERT_TRUE(activity_log->IsLogEnabled());

Powered by Google App Engine
This is Rietveld 408576698