summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/indexeddb/objectstore-basics.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/storage/indexeddb/objectstore-basics.html')
-rw-r--r--LayoutTests/storage/indexeddb/objectstore-basics.html36
1 files changed, 35 insertions, 1 deletions
diff --git a/LayoutTests/storage/indexeddb/objectstore-basics.html b/LayoutTests/storage/indexeddb/objectstore-basics.html
index 9730db8..005247e 100644
--- a/LayoutTests/storage/indexeddb/objectstore-basics.html
+++ b/LayoutTests/storage/indexeddb/objectstore-basics.html
@@ -47,7 +47,7 @@ function setVersionSuccess()
function createObjectStore()
{
- debug("creatObjectStore():");
+ debug("createObjectStore():");
window.store = evalAndLog("store = db.createObjectStore('storeName', null)");
var storeNames = evalAndLog("storeNames = db.objectStores");
@@ -195,6 +195,40 @@ function removeSuccess()
debug("removeSuccess():");
verifySuccessEvent(event);
shouldBeNull("event.result");
+ var store = evalAndLog("store = event.source");
+
+ try {
+ debug("Passing an invalid key into store.get().");
+ store.get([]);
+ testFailed("No exception thrown");
+ } catch (e) {
+ testPassed("Caught exception: " + e.toString());
+ }
+
+ try {
+ debug("Passing an invalid key into store.remove().");
+ store.remove([]);
+ testFailed("No exception thrown");
+ } catch (e) {
+ testPassed("Caught exception: " + e.toString());
+ }
+
+ try {
+ debug("Passing an invalid key into store.add().");
+ store.add(null, []);
+ testFailed("No exception thrown");
+ } catch (e) {
+ testPassed("Caught exception: " + e.toString());
+ }
+
+ try {
+ debug("Passing an invalid key into store.put().");
+ store.put(null, []);
+ testFailed("No exception thrown");
+ } catch (e) {
+ testPassed("Caught exception: " + e.toString());
+ }
+
done();
}