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 that when db.close is called in upgradeneeded, the db is clean
ed up on refresh."); | 6 description("Test that when db.close is called in upgradeneeded, the db is clean
ed up on refresh."); |
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.onsuccess = unexpectedSuccessCallback; | 19 request.onsuccess = unexpectedSuccessCallback; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 debug(""); | 52 debug(""); |
54 debug("Verify that the old connection is unchanged and was closed:"); | 53 debug("Verify that the old connection is unchanged and was closed:"); |
55 shouldBeNonNull("db"); | 54 shouldBeNonNull("db"); |
56 shouldBe('db.version', "7"); | 55 shouldBe('db.version', "7"); |
57 evalAndExpectException("db.transaction('os')", "DOMException.INVALID_STATE_E
RR", "'InvalidStateError'"); | 56 evalAndExpectException("db.transaction('os')", "DOMException.INVALID_STATE_E
RR", "'InvalidStateError'"); |
58 | 57 |
59 finishJSTest(); | 58 finishJSTest(); |
60 } | 59 } |
61 | 60 |
62 test(); | 61 test(); |
OLD | NEW |