summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/indexeddb/resources/shared.js
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2010-12-07 17:22:45 -0800
committerShimeng (Simon) Wang <swang@google.com>2010-12-22 14:15:40 -0800
commit4576aa36e9a9671459299c7963ac95aa94beaea9 (patch)
tree3863574e050f168c0126ecb47c83319fab0972d8 /LayoutTests/storage/indexeddb/resources/shared.js
parent55323ac613cc31553107b68603cb627264d22bb0 (diff)
downloadexternal_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.zip
external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.gz
external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.bz2
Merge WebKit at r73109: Initial merge by git.
Change-Id: I61f1a66d9642e3d8405d3ac6ccab2a53421c75d8
Diffstat (limited to 'LayoutTests/storage/indexeddb/resources/shared.js')
-rw-r--r--LayoutTests/storage/indexeddb/resources/shared.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/LayoutTests/storage/indexeddb/resources/shared.js b/LayoutTests/storage/indexeddb/resources/shared.js
index 01ec606..8c56832 100644
--- a/LayoutTests/storage/indexeddb/resources/shared.js
+++ b/LayoutTests/storage/indexeddb/resources/shared.js
@@ -87,11 +87,23 @@ function unexpectedCompleteCallback()
done();
}
+function evalAndExpectException(cmd, expected)
+{
+ debug("Expecting exception from " + cmd);
+ try {
+ eval(cmd);
+ testFailed("No exception thrown! Should have been " + expected);
+ } catch (e) {
+ code = e.code;
+ shouldBe("code", expected);
+ }
+}
+
// FIXME: remove the onfinished parameter.
function deleteAllObjectStores(db, onfinished)
{
- while (db.objectStores.length)
- db.removeObjectStore(db.objectStores.item(0));
+ while (db.objectStoreNames.length)
+ db.deleteObjectStore(db.objectStoreNames.item(0));
debug("Deleted all object stores.");
onfinished();