Confirm that IndexedDB can store an empty File from the Filesystem API
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Got FileSystem:file__0:Temporary
dbname = "empty-filesystem-file.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
store = db.createObjectStore('storeName')
store.put('value', 'key')
testEmptyFilesystemFile():
file = window.emptyFile
validateResult(file):
PASS file.size == 0 is true
transaction = db.transaction('storeName', 'readwrite', {durability: 'relaxed'})
store = transaction.objectStore('storeName')
store.put(file, 'filekey')
transaction = db.transaction('storeName', 'readwrite', {durability: 'relaxed'})
store = transaction.objectStore('storeName')
request = store.get('filekey')
PASS event.target.result.size == 0 is true
PASS successfullyParsed is true
TEST COMPLETE