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

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

Issue 2062203004: IDBObserver: Lifetime Management: Adding Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Units tests added Created 4 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: content/browser/indexed_db/indexed_db_database_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_database_unittest.cc b/content/browser/indexed_db/indexed_db_database_unittest.cc
index f01c413e100cf59a30ae49b0656fbc86eee55a86..b53f5d57bb77f6828aa4a8d1311a1c63cb5fca23 100644
--- a/content/browser/indexed_db/indexed_db_database_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_database_unittest.cc
@@ -238,9 +238,10 @@ class IndexedDBDatabaseOperationTest : public testing::Test {
IndexedDBDatabaseMetadata::DEFAULT_VERSION));
EXPECT_EQ(IndexedDBDatabaseMetadata::NO_VERSION, db_->metadata().version);
+ connection_ = new IndexedDBConnection(db_, callbacks_);
transaction_ = IndexedDBClassFactory::Get()->CreateIndexedDBTransaction(
- transaction_id, callbacks_, std::set<int64_t>() /*scope*/,
- blink::WebIDBTransactionModeVersionChange, db_.get(),
+ transaction_id, connection_, std::set<int64_t>() /*scope*/,
+ blink::WebIDBTransactionModeVersionChange,
new IndexedDBFakeBackingStore::FakeTransaction(commit_success_));
db_->TransactionCreated(transaction_.get());
@@ -258,6 +259,7 @@ class IndexedDBDatabaseOperationTest : public testing::Test {
scoped_refptr<MockIndexedDBCallbacks> request_;
scoped_refptr<MockIndexedDBDatabaseCallbacks> callbacks_;
scoped_refptr<IndexedDBTransaction> transaction_;
+ IndexedDBConnection* connection_;
Marijn Kruisselbrink 2016/06/30 00:17:25 this should probably be a unique_ptr<IndexedDBConn
palakj1 2016/06/30 01:07:04 Done.
leveldb::Status commit_success_;

Powered by Google App Engine
This is Rietveld 408576698