tor-browser

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

commit ea8c6d21b5f0ea9129feb3341d08cb7b857627be
parent ba826f7a4230234fa0ea14bcad56cd45a800ba7d
Author: Narcis Beleuzu <nbeleuzu@mozilla.com>
Date:   Thu,  9 Oct 2025 17:01:25 +0300

Revert "Bug 1993304: Enable the newer, faster canvas randomization r=freddyb" for causing bc failure on browser_canvas_randomization.js

This reverts commit 6a09a9ad8b53c6918ccb1c170a1e5976d7070fd2.

Diffstat:
Mbrowser/components/resistfingerprinting/test/browser/browser_canvas_iframes.js | 16----------------
Mbrowser/components/resistfingerprinting/test/browser/browser_canvas_popups.js | 10----------
Mbrowser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes.js | 10----------
Mbrowser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes_aboutblank.js | 10----------
Mbrowser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes_blob.js | 10----------
Mbrowser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes_data.js | 10----------
Mbrowser/components/resistfingerprinting/test/browser/browser_canvascompare_popups.js | 10----------
Mbrowser/components/resistfingerprinting/test/browser/browser_canvascompare_popups_aboutblank.js | 10----------
Mbrowser/components/resistfingerprinting/test/browser/browser_canvascompare_popups_blob.js | 10----------
Mbrowser/components/resistfingerprinting/test/browser/browser_canvascompare_popups_data.js | 10----------
Mbrowser/components/resistfingerprinting/test/browser/browser_efficientcanvascompare_iframes.js | 2+-
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_etp_iframes.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes.js | 6------
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_aboutblank.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_aboutsrcdoc.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_blob.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_blobcrossorigin.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_data.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_sandboxediframe.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_aboutblank.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_blob.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_blob_noopener.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_data.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_data_noopener.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_noopener.js | 5-----
Mbrowser/components/resistfingerprinting/test/browser/head.js | 22++++++++++++++++++----
Mtoolkit/components/resistfingerprinting/RFPTargetsDefault.inc | 2--
28 files changed, 19 insertions(+), 189 deletions(-)

diff --git a/browser/components/resistfingerprinting/test/browser/browser_canvas_iframes.js b/browser/components/resistfingerprinting/test/browser/browser_canvas_iframes.js @@ -69,22 +69,6 @@ let expectedResults = {}; var UNMODIFIED_CANVAS_DATA = undefined; add_setup(async function () { - registerCleanupFunction(async function () { - Services.prefs.clearUserPref( - "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" - ); - }); - - // Make sure Old Randomization is the only one on - await SpecialPowers.pushPrefEnv({ - set: [ - [ - "privacy.fingerprintingProtection.overrides", - "-EfficientCanvasRandomization,+CanvasRandomization", - ], - ], - }); - // Disable the fingerprinting randomization. await SpecialPowers.pushPrefEnv({ set: [ diff --git a/browser/components/resistfingerprinting/test/browser/browser_canvas_popups.js b/browser/components/resistfingerprinting/test/browser/browser_canvas_popups.js @@ -66,16 +66,6 @@ let expectedResults = {}; var UNMODIFIED_CANVAS_DATA = undefined; add_setup(async function () { - // Make sure Old Randomization is the only one on - await SpecialPowers.pushPrefEnv({ - set: [ - [ - "privacy.fingerprintingProtection.overrides", - "-EfficientCanvasRandomization,+CanvasRandomization", - ], - ], - }); - // Disable the fingerprinting randomization. await SpecialPowers.pushPrefEnv({ set: [ diff --git a/browser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes.js b/browser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes.js @@ -94,16 +94,6 @@ let expectedResults = {}; var UNMODIFIED_CANVAS_DATA = undefined; add_setup(async function () { - // Make sure Old Randomization is the only one on - await SpecialPowers.pushPrefEnv({ - set: [ - [ - "privacy.fingerprintingProtection.overrides", - "-EfficientCanvasRandomization,+CanvasRandomization", - ], - ], - }); - // Disable the fingerprinting randomization. await SpecialPowers.pushPrefEnv({ set: [ diff --git a/browser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes_aboutblank.js b/browser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes_aboutblank.js @@ -97,16 +97,6 @@ let expectedResults = {}; var UNMODIFIED_CANVAS_DATA = undefined; add_setup(async function () { - // Make sure Old Randomization is the only one on - await SpecialPowers.pushPrefEnv({ - set: [ - [ - "privacy.fingerprintingProtection.overrides", - "-EfficientCanvasRandomization,+CanvasRandomization", - ], - ], - }); - // Disable the fingerprinting randomization. await SpecialPowers.pushPrefEnv({ set: [ diff --git a/browser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes_blob.js b/browser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes_blob.js @@ -97,16 +97,6 @@ let expectedResults = {}; var UNMODIFIED_CANVAS_DATA = undefined; add_setup(async function () { - // Make sure Old Randomization is the only one on - await SpecialPowers.pushPrefEnv({ - set: [ - [ - "privacy.fingerprintingProtection.overrides", - "-EfficientCanvasRandomization,+CanvasRandomization", - ], - ], - }); - // Disable the fingerprinting randomization. await SpecialPowers.pushPrefEnv({ set: [ diff --git a/browser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes_data.js b/browser/components/resistfingerprinting/test/browser/browser_canvascompare_iframes_data.js @@ -97,16 +97,6 @@ let expectedResults = {}; var UNMODIFIED_CANVAS_DATA = undefined; add_setup(async function () { - // Make sure Old Randomization is the only one on - await SpecialPowers.pushPrefEnv({ - set: [ - [ - "privacy.fingerprintingProtection.overrides", - "-EfficientCanvasRandomization,+CanvasRandomization", - ], - ], - }); - // Disable the fingerprinting randomization. await SpecialPowers.pushPrefEnv({ set: [ diff --git a/browser/components/resistfingerprinting/test/browser/browser_canvascompare_popups.js b/browser/components/resistfingerprinting/test/browser/browser_canvascompare_popups.js @@ -95,16 +95,6 @@ let expectedResults = {}; var UNMODIFIED_CANVAS_DATA = undefined; add_setup(async function () { - // Make sure Old Randomization is the only one on - await SpecialPowers.pushPrefEnv({ - set: [ - [ - "privacy.fingerprintingProtection.overrides", - "-EfficientCanvasRandomization,+CanvasRandomization", - ], - ], - }); - // Disable the fingerprinting randomization. await SpecialPowers.pushPrefEnv({ set: [ diff --git a/browser/components/resistfingerprinting/test/browser/browser_canvascompare_popups_aboutblank.js b/browser/components/resistfingerprinting/test/browser/browser_canvascompare_popups_aboutblank.js @@ -96,16 +96,6 @@ let expectedResults = {}; var UNMODIFIED_CANVAS_DATA = undefined; add_setup(async function () { - // Make sure Old Randomization is the only one on - await SpecialPowers.pushPrefEnv({ - set: [ - [ - "privacy.fingerprintingProtection.overrides", - "-EfficientCanvasRandomization,+CanvasRandomization", - ], - ], - }); - // Disable the fingerprinting randomization. await SpecialPowers.pushPrefEnv({ set: [ diff --git a/browser/components/resistfingerprinting/test/browser/browser_canvascompare_popups_blob.js b/browser/components/resistfingerprinting/test/browser/browser_canvascompare_popups_blob.js @@ -92,16 +92,6 @@ let expectedResults = {}; var UNMODIFIED_CANVAS_DATA = undefined; add_setup(async function () { - // Make sure Old Randomization is the only one on - await SpecialPowers.pushPrefEnv({ - set: [ - [ - "privacy.fingerprintingProtection.overrides", - "-EfficientCanvasRandomization,+CanvasRandomization", - ], - ], - }); - // Disable the fingerprinting randomization. await SpecialPowers.pushPrefEnv({ set: [ diff --git a/browser/components/resistfingerprinting/test/browser/browser_canvascompare_popups_data.js b/browser/components/resistfingerprinting/test/browser/browser_canvascompare_popups_data.js @@ -92,16 +92,6 @@ let expectedResults = {}; var UNMODIFIED_CANVAS_DATA = undefined; add_setup(async function () { - // Make sure Old Randomization is the only one on - await SpecialPowers.pushPrefEnv({ - set: [ - [ - "privacy.fingerprintingProtection.overrides", - "-EfficientCanvasRandomization,+CanvasRandomization", - ], - ], - }); - // Disable the fingerprinting randomization. await SpecialPowers.pushPrefEnv({ set: [ diff --git a/browser/components/resistfingerprinting/test/browser/browser_efficientcanvascompare_iframes.js b/browser/components/resistfingerprinting/test/browser/browser_efficientcanvascompare_iframes.js @@ -72,7 +72,7 @@ requestLongerTimeout(2); var UNMODIFIED_CANVAS_DATA = undefined; add_setup(async function () { - // Make sure Efficient Randomization is the only one on + // Disable the fingerprinting randomization. await SpecialPowers.pushPrefEnv({ set: [ [ diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_etp_iframes.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_etp_iframes.js @@ -29,11 +29,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes.js @@ -39,12 +39,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); - registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_aboutblank.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_aboutblank.js @@ -39,11 +39,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_aboutsrcdoc.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_aboutsrcdoc.js @@ -39,11 +39,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_blob.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_blob.js @@ -39,11 +39,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_blobcrossorigin.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_blobcrossorigin.js @@ -42,11 +42,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_data.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_data.js @@ -39,11 +39,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_sandboxediframe.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_iframes_sandboxediframe.js @@ -39,11 +39,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups.js @@ -35,11 +35,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_aboutblank.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_aboutblank.js @@ -34,11 +34,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_blob.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_blob.js @@ -34,11 +34,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_blob_noopener.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_blob_noopener.js @@ -34,11 +34,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_data.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_data.js @@ -34,11 +34,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_data_noopener.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_data_noopener.js @@ -34,11 +34,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_noopener.js b/browser/components/resistfingerprinting/test/browser/browser_hwconcurrency_popups_noopener.js @@ -34,11 +34,6 @@ async function testHWConcurrency(result, expectedResults, extraData) { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["privacy.fingerprintingProtection.overrides", "+NavigatorHWConcurrency"], - ], - }); registerCleanupFunction(async function () { Services.prefs.clearUserPref( "privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings" diff --git a/browser/components/resistfingerprinting/test/browser/head.js b/browser/components/resistfingerprinting/test/browser/head.js @@ -845,7 +845,13 @@ async function simpleFPPTest( extraData.testDesc = extraData.testDesc || "simple FPP enabled"; expectedResults.shouldRFPApply = false; await SpecialPowers.pushPrefEnv({ - set: [["privacy.fingerprintingProtection", true]].concat(extraPrefs || []), + set: [ + ["privacy.fingerprintingProtection", true], + [ + "privacy.fingerprintingProtection.overrides", + "+NavigatorHWConcurrency,+CanvasRandomization", + ], + ].concat(extraPrefs || []), }); await runActualTest(uri, testFunction, expectedResults, extraData); @@ -867,9 +873,13 @@ async function simplePBMFPPTest( extraData.testDesc = extraData.testDesc || "simple FPP in PBM enabled"; expectedResults.shouldRFPApply = false; await SpecialPowers.pushPrefEnv({ - set: [["privacy.fingerprintingProtection.pbmode", true]].concat( - extraPrefs || [] - ), + set: [ + ["privacy.fingerprintingProtection.pbmode", true], + [ + "privacy.fingerprintingProtection.overrides", + "+NavigatorHWConcurrency,+CanvasRandomization", + ], + ].concat(extraPrefs || []), }); await runActualTest(uri, testFunction, expectedResults, extraData); @@ -926,6 +936,10 @@ async function RFPPBMFPP_NormalMode_ProtectionsTest( ["privacy.resistFingerprinting", false], ["privacy.resistFingerprinting.pbmode", true], ["privacy.fingerprintingProtection", true], + [ + "privacy.fingerprintingProtection.overrides", + "+NavigatorHWConcurrency,+CanvasRandomization", + ], ].concat(extraPrefs || []), }); diff --git a/toolkit/components/resistfingerprinting/RFPTargetsDefault.inc b/toolkit/components/resistfingerprinting/RFPTargetsDefault.inc @@ -4,7 +4,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ DESKTOP_DEFAULT(CanvasRandomization) -DESKTOP_DEFAULT(EfficientCanvasRandomization) DESKTOP_DEFAULT(FontVisibilityLangPack) DESKTOP_DEFAULT(JSMathFdlibm) DESKTOP_DEFAULT(ScreenAvailToResolution) @@ -12,7 +11,6 @@ DESKTOP_DEFAULT(NavigatorHWConcurrencyTiered) DESKTOP_DEFAULT(MaxTouchPointsCollapse) ANDROID_DEFAULT(CanvasRandomization) -ANDROID_DEFAULT(EfficientCanvasRandomization) ANDROID_DEFAULT(FontVisibilityLangPack) ANDROID_DEFAULT(JSMathFdlibm) ANDROID_DEFAULT(ScreenAvailToResolution)