2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
7 * This test is mainly to verify initTemporaryStorage() does call
8 * QuotaManager::EnsureTemporaryStorageIsInitializedInternal() which does
9 * various things, for example, it restores the directory metadata if it's
13 async
function testSteps() {
14 const originDirPath
= "storage/default/https+++foo.example.com";
15 const metadataFileName
= ".metadata-v2";
20 await
requestFinished(request
);
22 info("Verifying initialization status");
24 await
verifyInitializationStatus(true, false, false);
26 info("Creating an empty directory");
28 let originDir
= getRelativeFile(originDirPath
);
29 originDir
.create(Ci
.nsIFile
.DIRECTORY_TYPE
, parseInt("0755", 8));
31 info("Initializing the temporary storage");
33 request
= initTemporaryStorage();
34 await
requestFinished(request
);
37 "Verifying directory metadata was restored after calling " +
38 "initTemporaryStorage()"
41 let metadataFile
= originDir
.clone();
42 metadataFile
.append(metadataFileName
);
44 ok(metadataFile
.exists(), "Directory metadata file does exist");
46 info("Verifying initialization status");
48 await
verifyInitializationStatus(true, false, true);