OLD | NEW |
1 if (this.importScripts) { | 1 if (this.importScripts) { |
2 importScripts('../../../fast/js/resources/js-test-pre.js'); | 2 importScripts('../../../resources/js-test.js'); |
3 importScripts('shared.js'); | 3 importScripts('shared.js'); |
4 } | 4 } |
5 | 5 |
6 description("Test transaction aborts send the proper onabort messages.."); | 6 description("Test transaction aborts send the proper onabort messages.."); |
7 | 7 |
8 indexedDBTest(prepareDatabase, startTest); | 8 indexedDBTest(prepareDatabase, startTest); |
9 function prepareDatabase() | 9 function prepareDatabase() |
10 { | 10 { |
11 db = event.target.result; | 11 db = event.target.result; |
12 store = evalAndLog("store = db.createObjectStore('storeName', null)"); | 12 store = evalAndLog("store = db.createObjectStore('storeName', null)"); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 shouldBeFalse("abortFired"); | 62 shouldBeFalse("abortFired"); |
63 shouldBeNull("trans.error"); | 63 shouldBeNull("trans.error"); |
64 abortFired = true; | 64 abortFired = true; |
65 | 65 |
66 evalAndExpectException("store.add({x: 'value5', y: 'zzz5'}, 'key5')", "0", "
'TransactionInactiveError'"); | 66 evalAndExpectException("store.add({x: 'value5', y: 'zzz5'}, 'key5')", "0", "
'TransactionInactiveError'"); |
67 | 67 |
68 evalAndExpectException("trans.abort()", "DOMException.INVALID_STATE_ERR", "'
InvalidStateError'"); | 68 evalAndExpectException("trans.abort()", "DOMException.INVALID_STATE_ERR", "'
InvalidStateError'"); |
69 | 69 |
70 finishJSTest(); | 70 finishJSTest(); |
71 } | 71 } |
OLD | NEW |