OLD | NEW |
1 Confirm that IndexedDB can store an empty Blob/File/FileList | 1 Confirm that IndexedDB can store an empty Blob/File/FileList |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; | |
7 | |
8 dbname = "empty-blob-file.html" | 6 dbname = "empty-blob-file.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 store = db.createObjectStore('storeName') | 9 store = db.createObjectStore('storeName') |
12 store.put('value', 'key') | 10 store.put('value', 'key') |
13 | 11 |
14 testEmptyBlob(): | 12 testEmptyBlob(): |
15 blob = new Blob([]) | 13 blob = new Blob([]) |
16 | 14 |
17 validateResult(blob): | 15 validateResult(blob): |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 store = transaction.objectStore('storeName') | 111 store = transaction.objectStore('storeName') |
114 store.put(fileList, 'fileListkey') | 112 store.put(fileList, 'fileListkey') |
115 transaction = db.transaction('storeName', 'readwrite') | 113 transaction = db.transaction('storeName', 'readwrite') |
116 store = transaction.objectStore('storeName') | 114 store = transaction.objectStore('storeName') |
117 request = store.get('fileListkey') | 115 request = store.get('fileListkey') |
118 PASS event.target.result.length == 0 is true | 116 PASS event.target.result.length == 0 is true |
119 PASS successfullyParsed is true | 117 PASS successfullyParsed is true |
120 | 118 |
121 TEST COMPLETE | 119 TEST COMPLETE |
122 | 120 |
OLD | NEW |