summaryrefslogtreecommitdiffstats
path: root/webkit/database/database_tracker_unittest.cc
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-01 20:35:17 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-01 20:35:17 +0000
commit60a0438e453b5006cff34972df6188e2fb4e02ce (patch)
treef30d3ce2628a5371f8e8b52d71af31739309c4e4 /webkit/database/database_tracker_unittest.cc
parent75e5caceb33ed850b69ba0db8a08abd292a9d712 (diff)
downloadchromium_src-60a0438e453b5006cff34972df6188e2fb4e02ce.zip
chromium_src-60a0438e453b5006cff34972df6188e2fb4e02ce.tar.gz
chromium_src-60a0438e453b5006cff34972df6188e2fb4e02ce.tar.bz2
Add some safeguards in DatabaseTracker to prevent writing anything to disk for incognito.
TEST=manual and database_tracker_unittest.cc BUG=none Review URL: http://codereview.chromium.org/1597003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43381 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/database/database_tracker_unittest.cc')
-rw-r--r--webkit/database/database_tracker_unittest.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/webkit/database/database_tracker_unittest.cc b/webkit/database/database_tracker_unittest.cc
index 88e8981..e606c7e 100644
--- a/webkit/database/database_tracker_unittest.cc
+++ b/webkit/database/database_tracker_unittest.cc
@@ -167,7 +167,7 @@ TEST(DatabaseTrackerTest, DeleteOpenDatabase) {
tracker->RemoveObserver(&observer);
}
-TEST(DatabaseTrackerTest, TestIt) {
+TEST(DatabaseTrackerTest, DatabaseTracker) {
// Initialize the tracker database.
ScopedTempDir temp_dir;
EXPECT_TRUE(temp_dir.CreateUniqueTempDir());
@@ -361,4 +361,10 @@ TEST(DatabaseTrackerTest, TestIt) {
EXPECT_EQ(origin1_quota, tracker->GetOriginSpaceAvailable(kOrigin1));
}
+TEST(DatabaseTrackerTest, NoInitIncognito) {
+ scoped_refptr<DatabaseTracker> tracker(new DatabaseTracker(FilePath()));
+ EXPECT_TRUE(tracker->is_incognito_);
+ EXPECT_FALSE(tracker->LazyInit());
+}
+
} // namespace webkit_database