blob: 4192a16789917ab8197a79ae2d6c662ebd7268a9 [file] [log] [blame]
This tests basic operations putting blobs into an object store and then retrieving them.
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)
Initial upgrade needed: Old version - 0 New version - 1
Let's create a blob and store it in IndexedDB twice.
Added blob to database once
Added blob to database twice
Let's retrieve the blob again and verify the contents is the same.
Got blob from database
Correct text: true
Let's retrieve it again, create an object URL for the blob, load it via an XMLHttpRequest, and verify the contents are the same.
Got blob from database
Correct responseText: true
Retrieve both blob entries from the database and verify contents.
Correct text on first value: true
Correct text on second value: true
Got item from cursor
Got item from cursor
Finished cursor
Got right number of items: true
Correct text: true
Retrieve blobs from database via index and verify contents.
Got blob from database
Correct text: true
Got item from cursor
Got item from cursor
Finished cursor
Got right number of items: true
Correct text: true
Correct text: true
Slice the the retrieved blob and verify its contents.
Correct text: true
Send blob to a worker, read its contents there, and verify results.
Correct text: true
Correct text: true
Store a blob back in the database, and keep holding on to the blob, verifying that it still can be read.
Got blob from database
Stored blob back into database
Correct text: true
Correct responseText: true
PASS successfullyParsed is true
TEST COMPLETE