Part 2:
Bug 1354530 - Disable offline group in Preferences in Nightly because Storage Management v1 spec is done, r=jaws
MozReview-Commit-ID: A4xbomLFYlQ
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -680,17 +680,21 @@ pref("browser.preferences.instantApply",
// Toggling Search bar on and off in about:preferences
pref("browser.preferences.search", false);
// Once the Storage Management is completed.
// (The Storage Management-related prefs are browser.storageManager.* )
// The Offline(Appcache) Group section in about:preferences will be hidden.
// And the task to clear appcache will be done by Storage Management.
+#if defined(NIGHTLY_BUILD)
+pref("browser.preferences.offlineGroup.enabled", false);
+#else
pref("browser.preferences.offlineGroup.enabled", true);
+#endif
pref("browser.download.show_plugins_in_list", true);
pref("browser.download.hide_plugins_without_extensions", true);
// Backspace and Shift+Backspace behavior
// 0 goes Back/Forward
// 1 act like PgUp/PgDown
// 2 and other values, nothing
--- a/browser/base/content/test/general/browser_storagePressure_notification.js
+++ b/browser/base/content/test/general/browser_storagePressure_notification.js
@@ -52,11 +52,11 @@ add_task(function* () {
let notification = notificationbox.getNotificationWithValue("storage-pressure-notification");
ok(notification instanceof XULElement, "Should display storage pressure notification");
let prefBtn = notification.getElementsByTagName("button")[1];
let aboutPrefPromise = privacyAboutPrefPromise();
prefBtn.doCommand();
yield aboutPrefPromise;
let prefDoc = gBrowser.selectedBrowser.contentDocument;
- let offlineGroup = prefDoc.getElementById("offlineGroup");
- is_element_visible(offlineGroup, "Should open the Network tab in about:preferences#privacy");
+ let siteDataGroup = prefDoc.getElementById("siteDataGroup");
+ is_element_visible(siteDataGroup, "Should open the Network tab in about:preferences#privacy");
});
--- a/browser/components/preferences/in-content/tests/browser_bug731866.js
+++ b/browser/components/preferences/in-content/tests/browser_bug731866.js
@@ -16,16 +16,26 @@ function checkElements(expectedPane) {
for (let element of gElements) {
// keyset and preferences elements fail is_element_visible checks because they are never visible.
// special-case the drmGroup item because its visibility depends on pref + OS version
if (element.nodeName == "keyset" ||
element.nodeName == "preferences" ||
element.id === "drmGroup") {
continue;
}
+
+ // The siteDataGroup in the Storage Management project will replace the offlineGroup eventually,
+ // so during the transition period, we have to check the pref to see if the offlineGroup
+ // should be hidden always. See the bug 1354530 for the details.
+ if (element.id == "offlineGroup" &&
+ !SpecialPowers.getBoolPref("browser.preferences.offlineGroup.enabled")) {
+ is_element_hidden(element, "Disabled offlineGroup should be hidden");
+ continue;
+ }
+
let attributeValue = element.getAttribute("data-category");
let suffix = " (id=" + element.id + ")";
if (attributeValue == "pane" + expectedPane) {
is_element_visible(element, expectedPane + " elements should be visible" + suffix);
} else {
is_element_hidden(element, "Elements not in " + expectedPane + " should be hidden" + suffix);
}
}