blob: f4f3ece5a42c5129048f4fe035e185fde75f0b3f [file] [log] [blame]
Test IndexedDB keyPaths
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)
testing simple identifier
Deleted all object stores.
objectStore = db.createObjectStore(testData[nextToOpen].name, {keyPath: testData[nextToOpen].keyPath});
result = objectStore.add(testData[nextToOpen].value);
result = objectStore.openCursor();
cursor = event.target.result;
PASS cursor.key is testData[nextToOpen].key
testing simple identifiers
Deleted all object stores.
objectStore = db.createObjectStore(testData[nextToOpen].name, {keyPath: testData[nextToOpen].keyPath});
result = objectStore.add(testData[nextToOpen].value);
result = objectStore.openCursor();
cursor = event.target.result;
PASS cursor.key is testData[nextToOpen].key
testing nested identifiers
Deleted all object stores.
objectStore = db.createObjectStore(testData[nextToOpen].name, {keyPath: testData[nextToOpen].keyPath});
result = objectStore.add(testData[nextToOpen].value);
result = objectStore.openCursor();
cursor = event.target.result;
PASS cursor.key is testData[nextToOpen].key
testing nested identifiers with distractions
Deleted all object stores.
objectStore = db.createObjectStore(testData[nextToOpen].name, {keyPath: testData[nextToOpen].keyPath});
result = objectStore.add(testData[nextToOpen].value);
result = objectStore.openCursor();
cursor = event.target.result;
PASS cursor.key is testData[nextToOpen].key
PASS successfullyParsed is true
TEST COMPLETE