Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

/**
* Any copyright is dedicated to the Public Domain.
*/
const { PrincipalUtils } = ChromeUtils.importESModule(
);
const { IndexedDBUtils } = ChromeUtils.importESModule(
);
const { TestUtils } = ChromeUtils.importESModule(
);
/* exported testSteps */
async function testSteps() {
const principal = PrincipalUtils.createPrincipal("https://example.com");
const name = "test_databaseWorkStarted.js";
info("Starting database opening");
const openPromise = (async function () {
const request = indexedDB.openForPrincipal(principal, name);
const promise = IndexedDBUtils.requestFinished(request);
return promise;
})();
info("Waiting for database work to start");
await TestUtils.topicObserved("IndexedDB::DatabaseWorkStarted");
info("Waiting for database to finish opening");
await openPromise;
}