diff options
Diffstat (limited to 'LayoutTests/storage/indexeddb/resources/shared.js')
-rw-r--r-- | LayoutTests/storage/indexeddb/resources/shared.js | 16 |
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(); |