blob: bd10961861493b288cb4877809af1fe44f3c60af [file] [log] [blame]
Test IndexedDB keyPaths
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "keypath-fetch-key.html"
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