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

Unified Diff: content/browser/indexed_db/indexed_db_transaction_unittest.cc

Issue 237143006: Make iterating over a corrupted IndexedDB fail. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added Status checks. Created 6 years, 8 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: content/browser/indexed_db/indexed_db_transaction_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_transaction_unittest.cc b/content/browser/indexed_db/indexed_db_transaction_unittest.cc
index 463ebdc96381b32e38079ea6a696275882a67b46..06de9ac8171fe83b9f4b0bd8ebdf24b23979dd0a 100644
--- a/content/browser/indexed_db/indexed_db_transaction_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_transaction_unittest.cc
@@ -17,12 +17,22 @@ namespace content {
class IndexedDBTransactionTest : public testing::Test {
public:
IndexedDBTransactionTest() {
- IndexedDBFactory* factory = NULL;
backing_store_ = new IndexedDBFakeBackingStore();
+ CreateDB();
+ }
+
+ void CreateDB() {
+ // DB is created here instead of the constructor to workaround a
jsbell 2014/04/15 17:48:45 I think you can shorten the comment a bit, e.g. 'C
+ // "peculiarity of C++". More info at
+ // https://code.google.com/p/googletest/wiki/FAQ#My_compiler_complains_that_a_constructor_(or_destructor)_cannot
+ IndexedDBFactory* factory = NULL;
+ leveldb::Status s;
db_ = IndexedDBDatabase::Create(base::ASCIIToUTF16("db"),
backing_store_,
factory,
- IndexedDBDatabase::Identifier());
+ IndexedDBDatabase::Identifier(),
+ &s);
+ ASSERT_TRUE(s.ok());
}
void RunPostedTasks() { message_loop_.RunUntilIdle(); }
« no previous file with comments | « content/browser/indexed_db/indexed_db_fake_backing_store.cc ('k') | content/browser/indexed_db/leveldb/leveldb_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698