dgrogan@chromium.org | dfb73a2 | 2012-03-27 03:50:43 +0000 | [diff] [blame] | 1 | if (this.importScripts) { |
beidson@apple.com | f321a85 | 2014-02-12 18:17:47 +0000 | [diff] [blame] | 2 | importScripts('../../../resources/js-test.js'); |
dgrogan@chromium.org | dfb73a2 | 2012-03-27 03:50:43 +0000 | [diff] [blame] | 3 | importScripts('shared.js'); |
| 4 | } |
| 5 | |
| 6 | description("Test IndexedDB index .get() required argument"); |
| 7 | |
dgrogan@chromium.org | 7c1a471 | 2012-11-12 18:06:32 +0000 | [diff] [blame] | 8 | indexedDBTest(prepareDatabase); |
| 9 | function prepareDatabase() |
dgrogan@chromium.org | dfb73a2 | 2012-03-27 03:50:43 +0000 | [diff] [blame] | 10 | { |
dgrogan@chromium.org | 7c1a471 | 2012-11-12 18:06:32 +0000 | [diff] [blame] | 11 | db = event.target.result; |
| 12 | event.target.transaction.onabort = unexpectedAbortCallback; |
dgrogan@chromium.org | dfb73a2 | 2012-03-27 03:50:43 +0000 | [diff] [blame] | 13 | 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 | } |