2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
7 * This test is mainly to verify that initializeTemporaryOrigin() does call
8 * QuotaManager::EnsureTemporaryOriginIsInitialized() which ensures origin
12 async
function testSteps() {
13 const originMetadata
= {
14 persistence
: "default",
15 principal
: getPrincipal("https://foo.example.com"),
16 file
: getRelativeFile("storage/default/https+++foo.example.com"),
21 let request
= clear();
22 await
requestFinished(request
);
27 await
requestFinished(request
);
29 info("Initializing temporary storage");
31 request
= initTemporaryStorage();
32 await
requestFinished(request
);
34 info("Initializing temporary origin");
36 ok(!originMetadata
.file
.exists(), "Origin directory does not exist");
38 request
= initTemporaryOrigin(
39 originMetadata
.persistence
,
40 originMetadata
.principal
42 await
requestFinished(request
);
44 ok(originMetadata
.file
.exists(), "Origin directory does exist");
46 info("Verifying temporary origin initialization status");
48 request
= temporaryOriginInitialized(
49 originMetadata
.persistence
,
50 originMetadata
.principal
52 await
requestFinished(request
);
54 ok(request
.result
, "Temporary origin is initialized");