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

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

Issue 16510002: Better ActivityLog error handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reinstating the command line 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: chrome/browser/extensions/activity_log/activity_database_unittest.cc
diff --git a/chrome/browser/extensions/activity_log/activity_database_unittest.cc b/chrome/browser/extensions/activity_log/activity_database_unittest.cc
index e101b1a203ff0b7473ba1b361e5a0fb57a4a1f16..3a9c190d7ef2493fc1ef00288fed24989bcc4fd2 100644
--- a/chrome/browser/extensions/activity_log/activity_database_unittest.cc
+++ b/chrome/browser/extensions/activity_log/activity_database_unittest.cc
@@ -77,7 +77,7 @@ TEST_F(ActivityDatabaseTest, Init) {
ActivityDatabase* activity_db = new ActivityDatabase();
activity_db->Init(db_file);
- ASSERT_TRUE(activity_db->initialized());
+ ASSERT_TRUE(activity_db->is_db_valid());
activity_db->Close();
sql::Connection db;
@@ -99,7 +99,7 @@ TEST_F(ActivityDatabaseTest, RecordAPIAction) {
ActivityDatabase* activity_db = new ActivityDatabase();
activity_db->Init(db_file);
activity_db->SetBatchModeForTesting(false);
- ASSERT_TRUE(activity_db->initialized());
+ ASSERT_TRUE(activity_db->is_db_valid());
scoped_refptr<APIAction> action = new APIAction(
"punky",
base::Time::Now(),
@@ -134,7 +134,7 @@ TEST_F(ActivityDatabaseTest, RecordBlockedAction) {
ActivityDatabase* activity_db = new ActivityDatabase();
activity_db->Init(db_file);
- ASSERT_TRUE(activity_db->initialized());
+ ASSERT_TRUE(activity_db->is_db_valid());
scoped_refptr<BlockedAction> action = new BlockedAction(
"punky",
base::Time::Now(),
@@ -177,7 +177,7 @@ TEST_F(ActivityDatabaseTest, GetTodaysActions) {
// Record some actions
ActivityDatabase* activity_db = new ActivityDatabase();
activity_db->Init(db_file);
- ASSERT_TRUE(activity_db->initialized());
+ ASSERT_TRUE(activity_db->is_db_valid());
scoped_refptr<APIAction> api_action = new APIAction(
"punky",
mock_clock.Now() - base::TimeDelta::FromMinutes(40),
@@ -237,7 +237,7 @@ TEST_F(ActivityDatabaseTest, GetOlderActions) {
// Record some actions
ActivityDatabase* activity_db = new ActivityDatabase();
activity_db->Init(db_file);
- ASSERT_TRUE(activity_db->initialized());
+ ASSERT_TRUE(activity_db->is_db_valid());
scoped_refptr<APIAction> api_action = new APIAction(
"punky",
mock_clock.Now() - base::TimeDelta::FromDays(3)
@@ -309,7 +309,7 @@ TEST_F(ActivityDatabaseTest, BatchModeOff) {
activity_db->Init(db_file);
activity_db->SetBatchModeForTesting(false);
activity_db->SetClockForTesting(&mock_clock);
- ASSERT_TRUE(activity_db->initialized());
+ ASSERT_TRUE(activity_db->is_db_valid());
scoped_refptr<APIAction> api_action = new APIAction(
"punky",
mock_clock.Now() - base::TimeDelta::FromMinutes(40),
@@ -343,7 +343,7 @@ TEST_F(ActivityDatabaseTest, BatchModeOn) {
activity_db->Init(db_file);
activity_db->SetBatchModeForTesting(true);
activity_db->SetClockForTesting(&mock_clock);
- ASSERT_TRUE(activity_db->initialized());
+ ASSERT_TRUE(activity_db->is_db_valid());
scoped_refptr<APIAction> api_action = new APIAction(
"punky",
mock_clock.Now() - base::TimeDelta::FromMinutes(40),
@@ -388,5 +388,5 @@ TEST_F(ActivityDatabaseTest, InitFailure) {
activity_db->Close();
}
-} // namespace
+} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/activity_log/activity_database.cc ('k') | chrome/browser/extensions/activity_log/activity_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698