Bug 1901520 - Part 3: Add tests for the rendered template. r=backup-reviewers,kpatenio

Differential Revision: https://phabricator.services.mozilla.com/D214027
This commit is contained in:
Mike Conley
2024-06-24 20:47:05 +00:00
parent 1c0ab38d1f
commit 397c08d552
3 changed files with 257 additions and 1 deletions

View File

@@ -721,6 +721,16 @@ export class BackupService extends EventTarget {
return Ci.nsIZipWriter.COMPRESSION_BEST;
}
/**
* Returns the chrome:// URI string for the template that should be used to
* construct the single-file archive.
*
* @type {string}
*/
static get ARCHIVE_TEMPLATE() {
return "chrome://browser/content/backup/archive.template.html";
}
/**
* Returns a reference to a BackupService singleton. If this is the first time
* that this getter is accessed, this causes the BackupService singleton to be
@@ -965,7 +975,7 @@ export class BackupService extends EventTarget {
lazy.logConsole.log("Exporting single-file archive to ", archivePath);
await this.createArchive(
archivePath,
"chrome://browser/content/backup/archive.template.html",
BackupService.ARCHIVE_TEMPLATE,
compressedStagingPath,
this.#encState,
manifest.meta