2 <script src=
"../../resources/js-test.js"></script>
3 <script src=
"resources/shared.js"></script>
5 description("Ensure deleteDatabase() can run concurrently with transactions in other databases");
7 indexedDBTest(prepareDatabase
, startTransaction
);
8 function prepareDatabase()
10 db
= event
.target
.result
;
11 evalAndLog("db.createObjectStore('store')");
14 function startTransaction() {
16 debug("Start a transaction against the first database:");
17 evalAndLog("trans = db.transaction('store', 'readonly')");
18 evalAndLog("trans.objectStore('store').get(0)");
21 debug("Delete a different database:");
22 evalAndLog("dbname2 = dbname + '2'");
23 request
= evalAndLog("indexedDB.deleteDatabase(dbname2)");
24 request
.onblocked
= unexpectedBlockedCallback
;
25 request
.onerror
= unexpectedErrorCallback
;
26 request
.onsuccess = function() {
27 testPassed("success event was fired at delete request");
30 trans
.oncomplete
= finishJSTest
;