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

Unified Diff: chrome/test/data/indexeddb/transaction_test.js

Issue 6209005: Fix IndexedDB race condition during shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Jeremy's comments Created 9 years, 11 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
« no previous file with comments | « chrome/test/data/indexeddb/transaction_run_forever.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/indexeddb/transaction_test.js
diff --git a/chrome/test/data/indexeddb/transaction_test.js b/chrome/test/data/indexeddb/transaction_test.js
index 0b82e018d0f277371dfcb7b81cef487e751eea55..23e560e683e8286db41dd15167abac74dceef761 100644
--- a/chrome/test/data/indexeddb/transaction_test.js
+++ b/chrome/test/data/indexeddb/transaction_test.js
@@ -13,22 +13,23 @@ function finalTransactionAborted()
fail('The final transaction should not abort.');
}
-function emplyeeNotFound()
+function employeeNotFound()
{
debug('Employee not found.');
+ shouldBe("event.result", "undefined");
}
function newTransactionAborted()
{
debug('The transaction was aborted.');
- var finalTransaction = db.transaction([], IDBTransaction.READ_ONLY, 0);
+ var finalTransaction = db.transaction({objectStoreNames: [], mode: IDBTransaction.READ_ONLY});
finalTransaction.oncomplete = finalTransactionCompleted;
finalTransaction.onabort = finalTransactionAborted;
var request = finalTransaction.objectStore('employees').get(0);
- request.onsuccess = unexpectedSuccessCallback;
- request.onerror = emplyeeNotFound;
+ request.onsuccess = employeeNotFound;
+ request.onerror = unexpectedErrorCallback;
}
function newTransactionCompleted()
@@ -44,7 +45,7 @@ function employeeAdded()
function onSetVersionComplete()
{
debug('Creating new transaction.');
- var newTransaction = db.transaction([], IDBTransaction.READ_WRITE, 0);
+ var newTransaction = db.transaction({objectStoreNames: [], mode: IDBTransaction.READ_WRITE});
newTransaction.oncomplete = newTransactionCompleted;
newTransaction.onabort = newTransactionAborted;
« no previous file with comments | « chrome/test/data/indexeddb/transaction_run_forever.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698