Index: LayoutTests/storage/indexeddb/empty-blob-file-expected.txt |
diff --git a/LayoutTests/storage/indexeddb/empty-blob-file-expected.txt b/LayoutTests/storage/indexeddb/empty-blob-file-expected.txt |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9aa6456c38fbb12fa6907b88575cb45767642853 |
--- /dev/null |
+++ b/LayoutTests/storage/indexeddb/empty-blob-file-expected.txt |
@@ -0,0 +1,122 @@ |
+Confirm that IndexedDB can store an empty Blob/File/FileList |
+ |
+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; |
+ |
+dbname = "empty-blob-file.html" |
+indexedDB.deleteDatabase(dbname) |
+indexedDB.open(dbname) |
+store = db.createObjectStore('storeName') |
+store.put('value', 'key') |
+ |
+testEmptyBlob(): |
+blob = new Blob([]) |
+ |
+validateResult(blob): |
+PASS blob.size == 0 is true |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+store.put(blob, 'blobkey') |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+request = store.get('blobkey') |
+PASS event.target.result.size == 0 is true |
+ |
+testEmptyDataBlob(): |
+blob = new Blob(['', '', '']) |
+ |
+validateResult(blob): |
+PASS blob.size == 0 is true |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+store.put(blob, 'blobkey') |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+request = store.get('blobkey') |
+PASS event.target.result.size == 0 is true |
+ |
+testEmptyNestedBlob(): |
+blob = new Blob(['', new Blob([]), '']) |
+ |
+validateResult(blob): |
+PASS blob.size == 0 is true |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+store.put(blob, 'blobkey') |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+request = store.get('blobkey') |
+PASS event.target.result.size == 0 is true |
+ |
+testEmptyNestedDataBlob(): |
+blob = new Blob(['', new Blob(['']), '']) |
+ |
+validateResult(blob): |
+PASS blob.size == 0 is true |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+store.put(blob, 'blobkey') |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+request = store.get('blobkey') |
+PASS event.target.result.size == 0 is true |
+ |
+testEmptyFileInsideBlob(): |
+file = emptyFileInput.files[0] |
+blob = new Blob(['', file, '']) |
+ |
+validateResult(blob): |
+PASS blob.size == 0 is true |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+store.put(blob, 'blobkey') |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+request = store.get('blobkey') |
+PASS event.target.result.size == 0 is true |
+ |
+testEmptyFileInsideNestedBlob(): |
+file = emptyFileInput.files[0] |
+blob = new Blob(['', new Blob([file]), '']) |
+ |
+validateResult(blob): |
+PASS blob.size == 0 is true |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+store.put(blob, 'blobkey') |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+request = store.get('blobkey') |
+PASS event.target.result.size == 0 is true |
+ |
+testEmptyFile(): |
+file = emptyFileInput.files[0] |
+ |
+validateResult(file): |
+PASS file.size == 0 is true |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+store.put(file, 'filekey') |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+request = store.get('filekey') |
+PASS event.target.result.size == 0 is true |
+ |
+testEmptyFileList(): |
+fileList = emptyFileListInput.files |
+ |
+validateResult(fileList): |
+PASS fileList.length == 0 is true |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+store.put(fileList, 'fileListkey') |
+transaction = db.transaction('storeName', 'readwrite') |
+store = transaction.objectStore('storeName') |
+request = store.get('fileListkey') |
+PASS event.target.result.length == 0 is true |
+PASS successfullyParsed is true |
+ |
+TEST COMPLETE |
+ |