tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 4ac08d706ab9cba291c523107c2a43481e31d34b
parent 5836b489466382f3660f0beaea968c713fbef391
Author: William Durand <will+git@drnd.me>
Date:   Tue, 21 Oct 2025 12:07:06 +0000

Bug 1995530 - Allow unrecognized props in `bss.gecko.data_collection_permissions`. r=robwu,rpl

Differential Revision: https://phabricator.services.mozilla.com/D269385

Diffstat:
Mtoolkit/components/extensions/schemas/manifest.json | 3++-
Mtoolkit/components/extensions/test/xpcshell/test_ext_data_collection_permissions.js | 25+++++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/toolkit/components/extensions/schemas/manifest.json b/toolkit/components/extensions/schemas/manifest.json @@ -664,7 +664,8 @@ "optional": true, "default": false } - } + }, + "additionalProperties": { "$ref": "UnrecognizedProperty" } } }, "additionalProperties": { "$ref": "UnrecognizedProperty" } diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_data_collection_permissions.js b/toolkit/components/extensions/test/xpcshell/test_ext_data_collection_permissions.js @@ -227,3 +227,28 @@ add_task(async function test_permissions_have_localization_strings() { } } }); + +add_task(async function test_allow_unknown_props() { + const extension = await getExtension({ + manifest: { + browser_specific_settings: { + gecko: { + data_collection_permissions: { + required: ["none"], + unknown_prop: true, + }, + }, + }, + }, + }); + + Assert.ok( + extension.warnings[0]?.includes( + "Warning processing browser_specific_settings.gecko.data_collection_permissions.unknown_prop: " + + "An unexpected property was found in the WebExtension manifest." + ), + `Expected a warning about the unknown property` + ); + + await extension.cleanupGeneratedFile(); +});