blob: 58cf458a53b337d3c830e353c7a16a32dcb0f2ab [file] [log] [blame]
Test IndexedDB readyState property during different operations
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)
PASS openRequest.readyState is 'done'
objectStore = db.createObjectStore('foo');
key = 10;
request = objectStore.add({}, key);
PASS request.readyState is 'pending'
getRecord():
PASS request.readyState is 'done'
PASS event.target.result is key
request = objectStore.get(key);
PASS request.readyState is 'pending'
finalCheck():
PASS request.readyState is 'done'
PASS event.target.result == null is false
checkReadyStateInOpen():
PASS event.target is openRequest
PASS openRequest.readyState is "done"
PASS successfullyParsed is true
TEST COMPLETE