haikuwebkit/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-k...

20 lines
613 B
Plaintext

Test IndexedDB's behavior put()ing with null key
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
objectStore = db.createObjectStore('bar');
Expecting exception from objectStore.put({}, null);
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to store record in an IDBObjectStore: The parameter is not a valid key.
PASS successfullyParsed is true
TEST COMPLETE