Bug 1943761 - Add class alignment to the mozsearch analysis file. r=asuth
[gecko.git] / dom / quota / test / xpcshell / test_initializePersistentClient.js
blobd359ff40bd24564d71046bfd60833ba5e305be4a
1 /**
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
4 */
6 /**
7 * This test is mainly to verify that initializePersistentClient() does call
8 * QuotaManager::EnsurePersistentClientIsInitialized() which ensures client
9 * directory existence.
12 async function testSteps() {
13 const clientMetadata = {
14 principal: getPrincipal("https://foo.example.com"),
15 client: "sdb",
16 file: getRelativeFile("storage/permanent/https+++foo.example.com/sdb"),
19 info("Clearing");
21 let request = clear();
22 await requestFinished(request);
24 info("Initializing");
26 request = init();
27 await requestFinished(request);
29 info("Initializing persistent origin");
31 request = initPersistentOrigin(clientMetadata.principal);
32 await requestFinished(request);
34 ok(!clientMetadata.file.exists(), "Client directory does not exist");
36 info("Initializing persistent client");
38 request = initPersistentClient(
39 clientMetadata.principal,
40 clientMetadata.client
42 await requestFinished(request);
44 ok(clientMetadata.file.exists(), "Client directory does exist");