diff --git a/firefox/manifest.json b/firefox/manifest.json index 6d92013..e738e6e 100644 --- a/firefox/manifest.json +++ b/firefox/manifest.json @@ -15,7 +15,7 @@ } } }, - "permissions": ["alarms", "contextMenus", "idle", "storage", "tabs", "windows", "http://127.0.0.1/*", "http://localhost/*"], + "permissions": ["alarms", "contextMenus", "idle", "storage", "tabs", "http://127.0.0.1/*", "http://localhost/*"], "background": { "scripts": ["hostname.js", "activity-tracker.js", "protocol.js", "api.js", "queue.js", "i18n.js", "background.js"] }, diff --git a/package.json b/package.json index 7a0bb90..8dd403e 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "AGPL-3.0-or-later", "scripts": { "build": "node scripts/build-extension.js", - "test": "node scripts/test-hostname.js && node scripts/test-activity-tracker.js && node scripts/test-protocol.js && node scripts/test-i18n.js && node scripts/test-popup-settings.js && node scripts/test-popup-select-style.js && node scripts/test-popup-catalog-fallback.js && node scripts/test-background-i18n.js && node scripts/test-firefox-github-release.js", + "test": "node scripts/test-manifests.js && node scripts/test-hostname.js && node scripts/test-activity-tracker.js && node scripts/test-protocol.js && node scripts/test-i18n.js && node scripts/test-popup-settings.js && node scripts/test-popup-select-style.js && node scripts/test-popup-catalog-fallback.js && node scripts/test-background-i18n.js && node scripts/test-firefox-github-release.js", "sign:firefox": "./scripts/sign-firefox-xpi.sh", "release:firefox": "./scripts/release-firefox-xpi.sh", "publish:firefox": "./scripts/publish-firefox-github-release.sh", diff --git a/scripts/test-manifests.js b/scripts/test-manifests.js new file mode 100644 index 0000000..7e351f4 --- /dev/null +++ b/scripts/test-manifests.js @@ -0,0 +1,15 @@ +#!/usr/bin/env node +const assert = require('assert'); + +const chromium = require('../chromium/manifest.json'); +const firefox = require('../firefox/manifest.json'); + +assert.equal(chromium.version, firefox.version, 'browser packages must use the same version'); +assert.equal( + firefox.permissions.includes('windows'), + false, + 'Firefox does not accept the Chromium-only windows permission' +); +assert.equal(chromium.permissions.includes('windows'), true, 'Chromium still needs the windows permission'); + +console.log('browser manifest compatibility tests passed');