diff options
author | Kristian Monsen <kristianm@google.com> | 2010-09-30 15:42:16 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-10-07 10:59:29 +0100 |
commit | bec39347bb3bb5bf1187ccaf471d26247f28b585 (patch) | |
tree | 56bdc4c2978fbfd3d79d0d36d5d6c640ecc09cc8 /LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html | |
parent | 90b7966e7815b262cd19ac25f03aaad9b21fdc06 (diff) | |
download | external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.zip external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.gz external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.bz2 |
Merge WebKit at r68651 : Initial merge by git.
Change-Id: I3d6bff59f17eedd6722723354f386fec9be8ad12
Diffstat (limited to 'LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html')
-rw-r--r-- | LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html index e842f5b..7878c7f 100644 --- a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html +++ b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html @@ -49,7 +49,11 @@ function getValue() { verifySuccessEvent(event); - result = evalAndLog("event.source.get('key')"); + transaction = evalAndLog("db.transaction()"); + transaction.onabort = unexpectedErrorCallback; + var store = evalAndLog("store = transaction.objectStore('storeName')"); + + result = evalAndLog("store.get('key')"); verifyResult(result); result.onsuccess = addIndex; result.onerror = unexpectedErrorCallback; @@ -62,15 +66,20 @@ function addIndex() result = evalAndLog("event.source.createIndex('indexName', '')"); verifyResult(result); - result.onsuccess = removeObjectStore; + result.onsuccess = commitTransaction; result.onerror = unexpectedErrorCallback; } -function removeObjectStore() +function commitTransaction() { verifySuccessEvent(event); shouldBeTrue("event.source.indexNames.contains('indexName')"); + // Let the transaction commit. + window.setTimeout('removeObjectStore()', 0); +} +function removeObjectStore() +{ result = evalAndLog("db.removeObjectStore('storeName')"); verifyResult(result); result.onsuccess = createObjectStoreAgain; @@ -91,7 +100,11 @@ function getValueAgain() { verifySuccessEvent(event); - result = evalAndLog("event.result.get('key')"); + transaction = evalAndLog("db.transaction()"); + transaction.onabort = unexpectedErrorCallback; + var store = evalAndLog("store = transaction.objectStore('storeName')"); + + result = evalAndLog("store.get('key')"); verifyResult(result); result.onsuccess = unexpectedSuccessCallback; result.onerror = verifyError; @@ -100,7 +113,6 @@ function getValueAgain() function verifyError() { verifyErrorEvent(event); - // FIXME: Should just be IDBDatabaseException.NOT_FOUND_ERR but that doesn't work yet. shouldBe("event.code", "2"); shouldBeFalse("event.source.indexNames.contains('indexName')"); |