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 a deleteDatabase called while handling an upgradeneeded e
vent is queued and fires its events at the right time. The close() call to unblo
ck the delete occurs in the connection's 'versionchange' event handler."); | 6 description("Test that a deleteDatabase called while handling an upgradeneeded e
vent is queued and fires its events at the right time. The close() call to unblo
ck the delete occurs in the connection's 'versionchange' event handler."); |
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 = initiallyDeleted; | 13 request.onsuccess = initiallyDeleted; |
15 request.onerror = unexpectedErrorCallback; | 14 request.onerror = unexpectedErrorCallback; |
16 } | 15 } |
17 | 16 |
18 var sawUpgradeNeeded = false; | 17 var sawUpgradeNeeded = false; |
19 var sawVersionChange = false; | 18 var sawVersionChange = false; |
20 | 19 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 52 |
54 function deleteSuccessCallback(evt) | 53 function deleteSuccessCallback(evt) |
55 { | 54 { |
56 preamble(evt); | 55 preamble(evt); |
57 shouldBeTrue("sawVersionChange"); | 56 shouldBeTrue("sawVersionChange"); |
58 shouldBeTrue("sawUpgradeNeeded"); | 57 shouldBeTrue("sawUpgradeNeeded"); |
59 finishJSTest(); | 58 finishJSTest(); |
60 } | 59 } |
61 | 60 |
62 test(); | 61 test(); |
OLD | NEW |