| 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 902e004357b07f31f74789b9ab1146d35574f33a..b3e053b7b9f508ad2ee849452afda381650eefd4 100644
|
| --- a/content/browser/indexed_db/indexed_db_database_unittest.cc
|
| +++ b/content/browser/indexed_db/indexed_db_database_unittest.cc
|
| @@ -59,10 +59,13 @@ TEST(IndexedDBDatabaseTest, ConnectionLifecycle) {
|
| scoped_refptr<MockIndexedDBDatabaseCallbacks> callbacks1(
|
| new MockIndexedDBDatabaseCallbacks());
|
| const int64 transaction_id1 = 1;
|
| - db->OpenConnection(request1,
|
| - callbacks1,
|
| - transaction_id1,
|
| - IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION);
|
| + IndexedDBPendingConnection connection1(
|
| + request1,
|
| + callbacks1,
|
| + 0 /* fake child_process_id */,
|
| + transaction_id1,
|
| + IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION);
|
| + db->OpenConnection(connection1);
|
|
|
| EXPECT_FALSE(backing_store->HasOneRef()); // db, connection count > 0
|
|
|
| @@ -70,10 +73,13 @@ TEST(IndexedDBDatabaseTest, ConnectionLifecycle) {
|
| scoped_refptr<MockIndexedDBDatabaseCallbacks> callbacks2(
|
| new MockIndexedDBDatabaseCallbacks());
|
| const int64 transaction_id2 = 2;
|
| - db->OpenConnection(request2,
|
| - callbacks2,
|
| - transaction_id2,
|
| - IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION);
|
| + IndexedDBPendingConnection connection2(
|
| + request2,
|
| + callbacks2,
|
| + 0 /* fake child_process_id */,
|
| + transaction_id2,
|
| + IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION);
|
| + db->OpenConnection(connection2);
|
|
|
| EXPECT_FALSE(backing_store->HasOneRef()); // local and connection
|
|
|
| @@ -109,10 +115,13 @@ TEST(IndexedDBDatabaseTest, ForcedClose) {
|
| new MockIndexedDBDatabaseCallbacks());
|
| scoped_refptr<MockIndexedDBCallbacks> request(new MockIndexedDBCallbacks());
|
| const int64 upgrade_transaction_id = 3;
|
| - database->OpenConnection(request,
|
| - callbacks,
|
| - upgrade_transaction_id,
|
| - IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION);
|
| + IndexedDBPendingConnection connection(
|
| + request,
|
| + callbacks,
|
| + 0 /* fake child_process_id */,
|
| + upgrade_transaction_id,
|
| + IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION);
|
| + database->OpenConnection(connection);
|
| EXPECT_EQ(database, request->connection()->database());
|
|
|
| const int64 transaction_id = 123;
|
| @@ -167,10 +176,13 @@ TEST(IndexedDBDatabaseTest, PendingDelete) {
|
| scoped_refptr<MockIndexedDBDatabaseCallbacks> callbacks1(
|
| new MockIndexedDBDatabaseCallbacks());
|
| const int64 transaction_id1 = 1;
|
| - db->OpenConnection(request1,
|
| - callbacks1,
|
| - transaction_id1,
|
| - IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION);
|
| + IndexedDBPendingConnection connection(
|
| + request1,
|
| + callbacks1,
|
| + 0 /* fake child_process_id */,
|
| + transaction_id1,
|
| + IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION);
|
| + db->OpenConnection(connection);
|
|
|
| EXPECT_FALSE(backing_store->HasOneRef()); // local and db
|
|
|
|
|