| OLD | NEW |
| 1 if (this.importScripts) { | 1 if (this.importScripts) { |
| 2 importScripts('../../../resources/js-test.js'); | 2 importScripts('../../../resources/js-test.js'); |
| 3 importScripts('shared.js'); | 3 importScripts('shared.js'); |
| 4 } | 4 } |
| 5 | 5 |
| 6 description("Test the basics of IndexedDB's IDBObjectStore."); | 6 description("Test the basics of IndexedDB's IDBObjectStore."); |
| 7 | 7 |
| 8 indexedDBTest(prepareDatabase, testSetVersionAbort); | 8 indexedDBTest(prepareDatabase, testSetVersionAbort); |
| 9 function prepareDatabase(evt) | 9 function prepareDatabase(evt) |
| 10 { | 10 { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 shouldBeNull("store.indexNames.item(1)"); | 116 shouldBeNull("store.indexNames.item(1)"); |
| 117 shouldBeNull("store.indexNames.item(100)"); | 117 shouldBeNull("store.indexNames.item(100)"); |
| 118 } | 118 } |
| 119 | 119 |
| 120 var testDate = new Date("August 25, 1991 20:57:08"); | 120 var testDate = new Date("August 25, 1991 20:57:08"); |
| 121 var testDateB = new Date("Wed Jan 05 2011 15:54:49"); | 121 var testDateB = new Date("Wed Jan 05 2011 15:54:49"); |
| 122 | 122 |
| 123 function openAgain() | 123 function openAgain() |
| 124 { | 124 { |
| 125 preamble(); | 125 preamble(); |
| 126 expectError(); |
| 126 request = evalAndLog('indexedDB.open(dbname)'); | 127 request = evalAndLog('indexedDB.open(dbname)'); |
| 127 request.onerror = unexpectedErrorCallback; | 128 request.onerror = unexpectedErrorCallback; |
| 128 request.onblocked = unexpectedBlockedCallback; | 129 request.onblocked = unexpectedBlockedCallback; |
| 129 request.onupgradeneeded = unexpectedUpgradeNeededCallback; | 130 request.onupgradeneeded = unexpectedUpgradeNeededCallback; |
| 130 request.onsuccess = addData; | 131 request.onsuccess = addData; |
| 131 } | 132 } |
| 132 | 133 |
| 133 function addData(evt) | 134 function addData(evt) |
| 134 { | 135 { |
| 135 preamble(evt); | 136 preamble(evt); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 301 |
| 301 debug("The object store uses in-line keys but no key generator and the r
esult of evaluating the object store's key path does not yield a value."); | 302 debug("The object store uses in-line keys but no key generator and the r
esult of evaluating the object store's key path does not yield a value."); |
| 302 evalAndExpectException("storeWithInLineKeys.add({})", "0", "'DataError'"
); | 303 evalAndExpectException("storeWithInLineKeys.add({})", "0", "'DataError'"
); |
| 303 | 304 |
| 304 debug("The key parameter was provided but does not contain a valid key."
); | 305 debug("The key parameter was provided but does not contain a valid key."
); |
| 305 evalAndExpectException("storeWithOutOfLineKeys.add({}, null)", "0", "'Da
taError'"); | 306 evalAndExpectException("storeWithOutOfLineKeys.add({}, null)", "0", "'Da
taError'"); |
| 306 | 307 |
| 307 finishJSTest(); | 308 finishJSTest(); |
| 308 }; | 309 }; |
| 309 } | 310 } |
| OLD | NEW |