summaryrefslogtreecommitdiffstats
path: root/content/browser/indexed_db/indexed_db_unittest.cc
diff options
context:
space:
mode:
authorericu@chromium.org <ericu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 01:20:59 +0000
committerericu@chromium.org <ericu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 01:20:59 +0000
commitd29650cde71f39cfdf41cf14f8f6eaaddd162f1e (patch)
tree3a60288c48e36ba2cd556ae79f022e5a6d453807 /content/browser/indexed_db/indexed_db_unittest.cc
parentad03218bd84c0d3269d6a051ad53446ca5550657 (diff)
downloadchromium_src-d29650cde71f39cfdf41cf14f8f6eaaddd162f1e.zip
chromium_src-d29650cde71f39cfdf41cf14f8f6eaaddd162f1e.tar.gz
chromium_src-d29650cde71f39cfdf41cf14f8f6eaaddd162f1e.tar.bz2
Added IndexedDBPendingConnection to group up a bunch of parameters that get passed around together.
This includes a convenience method CreateConnection in IndexedDBDatabase.cc that's not strictly needed for this change, but makes the merge of other related CLs easier later. BUG=108012 R=cmumford,jsbell Review URL: https://codereview.chromium.org/198223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257568 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/indexed_db/indexed_db_unittest.cc')
-rw-r--r--content/browser/indexed_db/indexed_db_unittest.cc35
1 files changed, 20 insertions, 15 deletions
diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc
index c3704b8..5bf1efb 100644
--- a/content/browser/indexed_db/indexed_db_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_unittest.cc
@@ -174,18 +174,22 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnDelete) {
test_path = idb_context->GetFilePathForTesting(
webkit_database::GetIdentifierFromOrigin(kTestOrigin));
+ IndexedDBPendingConnection open_connection(open_callbacks,
+ open_db_callbacks,
+ 0 /* child_process_id */,
+ 0 /* host_transaction_id */,
+ 0 /* version */);
factory->Open(base::ASCIIToUTF16("opendb"),
- 0,
- 0,
- open_callbacks,
- open_db_callbacks,
+ open_connection,
kTestOrigin,
idb_context->data_path());
+ IndexedDBPendingConnection closed_connection(closed_callbacks,
+ closed_db_callbacks,
+ 0 /* child_process_id */,
+ 0 /* host_transaction_id */,
+ 0 /* version */);
factory->Open(base::ASCIIToUTF16("closeddb"),
- 0,
- 0,
- closed_callbacks,
- closed_db_callbacks,
+ closed_connection,
kTestOrigin,
idb_context->data_path());
@@ -247,13 +251,14 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnCommitFailure) {
scoped_refptr<MockIndexedDBDatabaseCallbacks> db_callbacks(
new MockIndexedDBDatabaseCallbacks());
const int64 transaction_id = 1;
- factory->Open(base::ASCIIToUTF16("db"),
- IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION,
- transaction_id,
- callbacks,
- db_callbacks,
- kTestOrigin,
- temp_dir.path());
+ IndexedDBPendingConnection connection(
+ callbacks,
+ db_callbacks,
+ 0 /* child_process_id */,
+ transaction_id,
+ IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION);
+ factory->Open(
+ base::ASCIIToUTF16("db"), connection, kTestOrigin, temp_dir.path());
EXPECT_TRUE(callbacks->connection());