blob: b97c017c46cdb3b72bb80becdfdeebbab3832958 [file] [log] [blame]
Test IndexedDB odd value datatypes
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "values-odd-types.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
db.createObjectStore('foo', {autoIncrement: true});
adding regexp value
objectStore.add(validTypes[nextToAdd].value)
adding date value
objectStore.add(validTypes[nextToAdd].value)
adding object value
objectStore.add(validTypes[nextToAdd].value)
adding imagedata value
objectStore.add(validTypes[nextToAdd].value)
request = objectStore.openCursor();
cursor = event.target.result;
PASS cursor.value.toString() is validTypes[valueIndex].value.toString()
cursor.continue();
valueIndex++;
cursor = event.target.result;
PASS cursor.value.toString() is validTypes[valueIndex].value.toString()
PASS cursor.value.toUTCString() is "Thu, 01 Jan 1970 00:00:00 GMT"
cursor.continue();
valueIndex++;
cursor = event.target.result;
PASS cursor.value.toString() is validTypes[valueIndex].value.toString()
cursor.continue();
valueIndex++;
cursor = event.target.result;
PASS cursor.value.toString() is validTypes[valueIndex].value.toString()
PASS cursor.value.width is 1
cursor.continue();
valueIndex++;
cursor = event.target.result;
PASS successfullyParsed is true
TEST COMPLETE