blob: 0c71ce68a7c8e00f61e270d19d305d854c5b422c [file] [log] [blame]
Test IndexedDB invalid keys
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "invalid-keys.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
db.createObjectStore('foo');
Expecting exception from request = objectStore.put('value', void 0)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
Expecting exception from request = objectStore.put('value', null)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', (function() { return arguments; }()))
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', true)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', false)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', new Error)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', function () {})
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', JSON)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', Math)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', NaN)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', new Date(NaN))
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', {})
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', /regex/)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', self)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', self.document)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
Expecting exception from request = objectStore.put('value', self.document.body)
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key.
PASS successfullyParsed is true
TEST COMPLETE