blob: 2b96b02c7661cbdeb5d98ffabf3dcf0d77264bcd [file] [log] [blame]
Test that expected exceptions are thrown when storing a Wasm Module into a DB.
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)
store = db.createObjectStore('store')
Expecting exception from store.add(module, 'key')
PASS Exception was thrown.
PASS code is DOMException.DATA_CLONE_ERR
Exception message: Failed to store record in an IDBObjectStore: An object could not be cloned.
PASS successfullyParsed is true
TEST COMPLETE