| 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("Call db.close() in the complete handler for a version change transa
ction, before the success event associated with the open call fires"); | 6 description("Call db.close() in the complete handler for a version change transa
ction, before the success event associated with the open call fires"); |
| 7 | 7 |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 removeVendorPrefixes(); | |
| 11 setDBNameFromPath(); | 10 setDBNameFromPath(); |
| 12 | 11 |
| 13 request = evalAndLog("indexedDB.deleteDatabase(dbname)"); | 12 request = evalAndLog("indexedDB.deleteDatabase(dbname)"); |
| 14 request.onsuccess = deleteSuccess; | 13 request.onsuccess = deleteSuccess; |
| 15 request.onerror = unexpectedErrorCallback; | 14 request.onerror = unexpectedErrorCallback; |
| 16 } | 15 } |
| 17 | 16 |
| 18 function deleteSuccess(evt) { | 17 function deleteSuccess(evt) { |
| 19 evalAndLog("request = indexedDB.open(dbname, 7)"); | 18 evalAndLog("request = indexedDB.open(dbname, 7)"); |
| 20 request.onupgradeneeded = upgradeNeeded; | 19 request.onupgradeneeded = upgradeNeeded; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 47 preamble(evt); | 46 preamble(evt); |
| 48 shouldBeTrue("sawTransactionComplete"); | 47 shouldBeTrue("sawTransactionComplete"); |
| 49 shouldBeUndefined("event.target.result"); | 48 shouldBeUndefined("event.target.result"); |
| 50 shouldBeNonNull("event.target.error"); | 49 shouldBeNonNull("event.target.error"); |
| 51 shouldBeEqualToString("event.target.error.name", "AbortError"); | 50 shouldBeEqualToString("event.target.error.name", "AbortError"); |
| 52 evalAndExpectException("transaction = db.transaction('os', 'readwrite')", "D
OMException.INVALID_STATE_ERR", "'InvalidStateError'"); | 51 evalAndExpectException("transaction = db.transaction('os', 'readwrite')", "D
OMException.INVALID_STATE_ERR", "'InvalidStateError'"); |
| 53 finishJSTest(); | 52 finishJSTest(); |
| 54 } | 53 } |
| 55 | 54 |
| 56 test(); | 55 test(); |
| OLD | NEW |