From c39e57fe94a729171344925a56bf708f3c0cfd63 Mon Sep 17 00:00:00 2001 From: "Fischer.json" Date: Fri, 7 Apr 2017 21:21:32 +0800 Subject: [PATCH] Part 2: Bug 1354530 - Disable offline group in Preferences in Nightly because Storage Management v1 spec is done, r=jaws MozReview-Commit-ID: A4xbomLFYlQ --HG-- extra : rebase_source : 9b5088f65c86ea6eb78b1c020cabed8922555234 --- browser/app/profile/firefox.js | 4 ++++ .../general/browser_storagePressure_notification.js | 4 ++-- .../preferences/in-content/tests/browser_bug731866.js | 10 ++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index b46b62bc80d0..c89e45e23099 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -685,7 +685,11 @@ pref("browser.preferences.search", false); // (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); diff --git a/browser/base/content/test/general/browser_storagePressure_notification.js b/browser/base/content/test/general/browser_storagePressure_notification.js index c3b0f90de0e3..8808f551b91f 100644 --- a/browser/base/content/test/general/browser_storagePressure_notification.js +++ b/browser/base/content/test/general/browser_storagePressure_notification.js @@ -57,6 +57,6 @@ add_task(function* () { 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"); }); diff --git a/browser/components/preferences/in-content/tests/browser_bug731866.js b/browser/components/preferences/in-content/tests/browser_bug731866.js index c75a6460f2e7..c592a89226ba 100644 --- a/browser/components/preferences/in-content/tests/browser_bug731866.js +++ b/browser/components/preferences/in-content/tests/browser_bug731866.js @@ -21,6 +21,16 @@ function checkElements(expectedPane) { 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) {