blob: 484e298ed32da4161998be8a2257f5c2d7324c23 [file] [log] [blame]
Test IndexedDB's webkitIndexedDB.deleteDatabase().
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('storeName', null)
store.createIndex('indexName', '')
PASS store.indexNames.contains('indexName') is true
store.add('value', 'key')
db.transaction('storeName', 'readwrite')
store = transaction.objectStore('storeName')
store.get('key')
PASS event.target.result is "value"
db.close()
indexedDB.open(dbname, 2)
db = event.target.result
request = indexedDB.deleteDatabase(dbname)
db.close()
PASS request.result is undefined.
indexedDB.open(dbname, 3)
db = event.target.result
PASS db.objectStoreNames.length is 0
PASS successfullyParsed is true
TEST COMPLETE