blob: 23338887615c7ee7da363ab8fb4482efc3e34114 [file] [log] [blame]
dgrogan@chromium.orgdfb73a22012-03-27 03:50:43 +00001if (this.importScripts) {
beidson@apple.comf321a852014-02-12 18:17:47 +00002 importScripts('../../../resources/js-test.js');
dgrogan@chromium.orgdfb73a22012-03-27 03:50:43 +00003 importScripts('shared.js');
4}
5
6description("Test IndexedDB index .get() required argument");
7
dgrogan@chromium.org7c1a4712012-11-12 18:06:32 +00008indexedDBTest(prepareDatabase);
9function prepareDatabase()
dgrogan@chromium.orgdfb73a22012-03-27 03:50:43 +000010{
dgrogan@chromium.org7c1a4712012-11-12 18:06:32 +000011 db = event.target.result;
12 event.target.transaction.onabort = unexpectedAbortCallback;
dgrogan@chromium.orgdfb73a22012-03-27 03:50:43 +000013 objectStore = evalAndLog("objectStore = db.createObjectStore('foo', { keyPath: 'id', autoIncrement: true });");
14 index = evalAndLog("index = objectStore.createIndex('first', 'first');");
15 shouldThrow("index.get();");
16 shouldThrow("index.getKey();");
17 finishJSTest();
18}