fix fonts
Release Firefox and Chromium extensions / Package and attach browser extensions (release) Successful in 4s

This commit is contained in:
2026-08-30 21:38:00 +02:00
parent df16075421
commit 4d3401fa4c
2 changed files with 31 additions and 0 deletions
+20
View File
@@ -74,6 +74,10 @@ test("builds a deterministic unsigned XPI with the release version and runtime f
assert.equal(first.archiveName, "glagolify-9.8.7.xpi");
assert.deepEqual([...entries.keys()], [...FIREFOX_ARCHIVE_FILES]);
assert.deepEqual(
entries.get("content.css"),
await readFile(path.join(rootDirectory, "content.css"))
);
const manifest = JSON.parse(entries.get("manifest.json"));
assert.equal(manifest.version, "9.8.7");
assert.equal(manifest.manifest_version, 2);
@@ -127,6 +131,22 @@ test("builds a Chromium MV3 ZIP with Chromium manifest fields and raster icons",
]);
assert.equal(manifest.icons["128"], "icons/icon-128.png");
const contentCss = entries.get("content.css").toString("utf8");
const fontUrls = [...contentCss.matchAll(/src: url\("([^"]+)"\)/g)].map(
(match) => match[1]
);
const extensionUrl = "chrome-extension://__MSG_@@extension_id__/";
assert.equal(fontUrls.length, 4);
for (const fontUrl of fontUrls) {
assert.equal(fontUrl.startsWith(extensionUrl), true);
const relativePath = fontUrl.slice(extensionUrl.length);
assert.equal(entries.has(relativePath), true);
assert.equal(
manifest.web_accessible_resources[0].resources.includes(relativePath),
true
);
}
for (const relativePath of CHROMIUM_ARCHIVE_FILES.filter((name) =>
name.endsWith(".png")
)) {