Chromium Code Reviews| 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(); } |