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

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

Issue 23729005: Enable Activity Logging by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added definition of 'active' Created 7 years, 4 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: 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 367d0df28a93b52f4e1eb3cceef13dbe93cbfc65..757d4c28e4331f8c7ebc85c066698f4509de52bc 100644
--- a/chrome/browser/extensions/activity_log/activity_log_unittest.cc
+++ b/chrome/browser/extensions/activity_log/activity_log_unittest.cc
@@ -76,6 +76,16 @@ class ActivityLogTest : public ChromeRenderViewHostTestHarness {
activity_log->SetDefaultPolicy(ActivityLogPolicy::POLICY_COUNTS);
}
+ bool GetDatabaseEnabled() {
+ ActivityLog* activity_log = ActivityLog::GetInstance(profile());
+ return activity_log->IsDatabaseEnabled();
+ }
+
+ bool GetWatchdogActive() {
+ ActivityLog* activity_log = ActivityLog::GetInstance(profile());
+ return activity_log->IsWatchdogAppActive();
+ }
+
static void Arguments_Prerender(
scoped_ptr<std::vector<scoped_refptr<Action> > > i) {
ASSERT_EQ(1U, i->size());
@@ -97,14 +107,14 @@ class ActivityLogTest : public ChromeRenderViewHostTestHarness {
};
TEST_F(ActivityLogTest, Construct) {
- ActivityLog* activity_log = ActivityLog::GetInstance(profile());
- ASSERT_TRUE(activity_log->IsLogEnabled());
+ ASSERT_TRUE(GetDatabaseEnabled());
+ ASSERT_FALSE(GetWatchdogActive());
}
TEST_F(ActivityLogTest, LogAndFetchActions) {
ActivityLog* activity_log = ActivityLog::GetInstance(profile());
scoped_ptr<base::ListValue> args(new base::ListValue());
- ASSERT_TRUE(activity_log->IsLogEnabled());
+ ASSERT_TRUE(GetDatabaseEnabled());
// Write some API calls
scoped_refptr<Action> action = new Action(kExtensionId,
@@ -135,7 +145,7 @@ TEST_F(ActivityLogTest, LogPrerender) {
.Build();
extension_service_->AddExtension(extension.get());
ActivityLog* activity_log = ActivityLog::GetInstance(profile());
- ASSERT_TRUE(activity_log->IsLogEnabled());
+ ASSERT_TRUE(GetDatabaseEnabled());
GURL url("http://www.google.com");
prerender::PrerenderManager* prerender_manager =

Powered by Google App Engine
This is Rietveld 408576698