1 if (this.importScripts) {
2 importScripts('../../../resources/js-test.js');
3 importScripts('shared.js');
6 description("Test that deleteDatabase is not blocked when connections close in on versionchange callback");
11 request = evalAndLog("indexedDB.open(dbname)");
12 request.onblocked = unexpectedBlockedCallback;
13 request.onerror = unexpectedErrorCallback;
14 request.onsuccess = function openOnSuccess(evt) {
16 evalAndLog("h = event.target.result");
18 h.onversionchange = function onVersionChange(evt) {
20 shouldBe("event.target.version", "1");
21 shouldBe("event.oldVersion", "1");
22 shouldBeNull("event.newVersion");
23 evalAndLog("h.close()");
26 request = evalAndLog("indexedDB.deleteDatabase(dbname)");
27 request.onerror = unexpectedErrorCallback;
28 request.onblocked = unexpectedBlockedCallback;
29 request.onsuccess = function deleteDatabaseOnSuccess(evt) {
31 testPassed("blocked event was not fired");