commit 36a1a31a845505aba93113af554560e6d42496f0
parent 40933b16233b5b9b6206d34821530a9aecac98fd
Author: Andreas Farre <farre@mozilla.com>
Date: Fri, 31 Oct 2025 15:04:46 +0000
Bug 1979288 - Enable Navigation API on Nightly. r=webidl,smaug,jjaschke,avandolder
Differential Revision: https://phabricator.services.mozilla.com/D269237
Diffstat:
3 files changed, 47 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,58 @@ 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 },
// 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 +1812,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