blob: 5a44c34bba151720b8090392ed0f4f01e1e5e504 [file] [log] [blame]
Ensure DataCloneError is consistently thrown by IndexedDB methods
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "clone-exception.html"
doFirstOpen():
indexedDB.open(dbname + '1')
onUpgradeNeeded():
Expecting exception from db.createObjectStore('store').put(NON_CLONEABLE, 0);
PASS Exception was thrown.
PASS code is 25
PASS ename is 'DataCloneError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': #<Window> could not be cloned.
doSecondOpen():
indexedDB.open(dbname + '2')
onUpgradeNeeded():
Expecting exception from db.createObjectStore('store').put(NON_CLONEABLE, 0);
PASS Exception was thrown.
PASS code is 25
PASS ename is 'DataCloneError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': #<Window> could not be cloned.
doThirdOpen():
indexedDB.open(dbname + '3')
onUpgradeNeeded():
Expecting exception from db.createObjectStore('store').put(NON_CLONEABLE, INVALID_KEY);
PASS Exception was thrown.
PASS code is 25
PASS ename is 'DataCloneError'
Exception message: Failed to execute 'put' on 'IDBObjectStore': #<Window> could not be cloned.
PASS successfullyParsed is true
TEST COMPLETE