tor-browser

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

commit 0d4715e2385f0adc46993bda10d187552f400767
parent 179cfad1ab33855ac586d7649f94fe4f22fe05f4
Author: Andreas Farre <farre@mozilla.com>
Date:   Fri, 31 Oct 2025 17:48:39 +0000

Bug 1979288 - Enable Navigation API on Nightly. r=webidl,smaug,jjaschke,avandolder

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

Diffstat:
Mdom/tests/mochitest/general/interface_exposure_checker.js | 4++++
Mdom/tests/mochitest/general/test_interfaces.js | 55+++++++++++++++++++++++++++++++++++++++++++++++--------
Mmodules/libpref/init/StaticPrefList.yaml | 2+-
3 files changed, 52 insertions(+), 9 deletions(-)

diff --git a/dom/tests/mochitest/general/interface_exposure_checker.js b/dom/tests/mochitest/general/interface_exposure_checker.js @@ -13,6 +13,7 @@ function entryDisabled( isInsecureContext, isFennec, isCrossOriginIsolated, + isSessionHistoryInParent, } ) { return ( @@ -35,6 +36,7 @@ function entryDisabled( (isInsecureContext && !entry.insecureContext) || entry.earlyBetaOrEarlier === !isEarlyBetaOrEarlier || entry.crossOriginIsolated === !isCrossOriginIsolated || + entry.sessionHistoryInParent === !isSessionHistoryInParent || entry.disabled ); } @@ -133,6 +135,7 @@ if (typeof window !== "undefined") { "resource://gre/modules/AppConstants.sys.mjs" ); const sysinfo = SpecialPowers.Services.sysinfo; + const appinfo = SpecialPowers.Services.appinfo; return { isNightly: AppConstants.NIGHTLY_BUILD, @@ -152,6 +155,7 @@ if (typeof window !== "undefined") { SpecialPowers.Ci.nsIGeckoViewBridge ).isFennec, isCrossOriginIsolated: window.crossOriginIsolated, + isSessionHistoryInParent: appinfo.sessionHistoryInParent, }; }; } diff --git a/dom/tests/mochitest/general/test_interfaces.js b/dom/tests/mochitest/general/test_interfaces.js @@ -996,31 +996,63 @@ let interfaceNamesInGlobalScope = [ // IMPORTANT: Do not change this list without review from a DOM peer! { name: "NamedNodeMap", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! - { name: "NavigateEvent", insecureContext: true, disabled: true }, + { + name: "NavigateEvent", + insecureContext: true, + nightly: true, + sessionHistoryInParent: true, + }, // IMPORTANT: Do not change this list without review from a DOM peer! - { name: "Navigation", insecureContext: true, disabled: true }, + { + name: "Navigation", + insecureContext: true, + nightly: true, + sessionHistoryInParent: true, + }, // IMPORTANT: Do not change this list without review from a DOM peer! - { name: "NavigationActivation", insecureContext: true, disabled: true }, + { + name: "NavigationActivation", + insecureContext: true, + nightly: true, + sessionHistoryInParent: true, + }, // IMPORTANT: Do not change this list without review from a DOM peer! { name: "NavigationCurrentEntryChangeEvent", insecureContext: true, - disabled: true, + nightly: true, + sessionHistoryInParent: true, }, // IMPORTANT: Do not change this list without review from a DOM peer! - { name: "NavigationDestination", insecureContext: true, disabled: true }, + { + name: "NavigationDestination", + insecureContext: true, + nightly: true, + sessionHistoryInParent: true, + }, // IMPORTANT: Do not change this list without review from a DOM peer! - { name: "NavigationHistoryEntry", insecureContext: true, disabled: true }, + { + name: "NavigationHistoryEntry", + insecureContext: true, + nightly: true, + sessionHistoryInParent: true, + }, // IMPORTANT: Do not change this list without review from a DOM peer! { name: "NavigationPrecommitController", insecureContext: true, - disabled: true, + nightly: true, + sessionHistoryInParent: true, }, // IMPORTANT: Do not change this list without review from a DOM peer! "NavigationPreloadManager", // IMPORTANT: Do not change this list without review from a DOM peer! - { name: "NavigationTransition", insecureContext: true, disabled: true }, + { + name: "NavigationTransition", + insecureContext: true, + nightly: true, + sessionHistoryInParent: true, + }, // IMPORTANT: Do not change this list without review from a DOM peer! { name: "Navigator", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! @@ -1785,6 +1817,13 @@ let interfaceNamesInGlobalScope = [ // IMPORTANT: Do not change this list without review from a DOM peer! { name: "name", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! + { + name: "navigation", + insecureContext: true, + nightly: true, + sessionHistoryInParent: true, + }, + // IMPORTANT: Do not change this list without review from a DOM peer! { name: "navigator", insecureContext: true }, // IMPORTANT: Do not change this list without review from a DOM peer! { name: "netscape", insecureContext: true }, diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml @@ -3687,7 +3687,7 @@ # Whether the navigation API will be exposed. - name: dom.navigation.webidl.enabled type: RelaxedAtomicBool - value: false + value: @IS_NIGHTLY_BUILD@ mirror: always do_not_use_directly: true