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

Unified Diff: webkit/dom_storage/session_storage_database_unittest.cc

Issue 9963107: Persist sessionStorage on disk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Draft: associate with session restore. Created 8 years, 7 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: webkit/dom_storage/session_storage_database_unittest.cc
diff --git a/webkit/dom_storage/session_storage_database_unittest.cc b/webkit/dom_storage/session_storage_database_unittest.cc
index a9d159cf16d5f40f03cfe39882014f362fc93afa..2486c4916f76fe5a7903f98ef6a237287813bf1a 100644
--- a/webkit/dom_storage/session_storage_database_unittest.cc
+++ b/webkit/dom_storage/session_storage_database_unittest.cc
@@ -851,4 +851,19 @@ TEST_F(SessionStorageDatabaseTest, NamespaceOffsetDeleteNamespace) {
CheckAreaData(-1, kOrigin1, data1);
}
+TEST_F(SessionStorageDatabaseTest, DeleteNamespaceConfusion) {
+ // Regression test for a bug where a namespace with id 10 prevented deleting
+ // the namespace with id 1.
+
+ // Create namespace with IDs 0 to 10. The real IDs in the DB will correspond
+ // to these IDs.
+ ValuesMap data1;
+ data1[kKey1] = kValue1;
+ for (int i = 0; i <= 10; ++i)
+ ASSERT_TRUE(db_->CommitAreaChanges(i, kOrigin1, false, data1));
+
+ // Delete the namespace with ID 1.
+ EXPECT_TRUE(db_->DeleteNamespace(1));
+}
+
} // namespace dom_storage

Powered by Google App Engine
This is Rietveld 408576698