tests are all passing. eslint gives no errors. all dead code removed. Completed Mike's comments on bugzilla.
draft
tests are all passing. eslint gives no errors. all dead code removed. Completed Mike's comments on bugzilla.
MozReview-Commit-ID: I6vTGmA5SUg
--- a/browser/components/preferences/in-content/advanced.js
+++ b/browser/components/preferences/in-content/advanced.js
@@ -30,17 +30,16 @@ var gAdvancedPane = {
let onUnload = function() {
window.removeEventListener("unload", onUnload);
Services.prefs.removeObserver("app.update.", this);
}.bind(this);
window.addEventListener("unload", onUnload);
Services.prefs.addObserver("app.update.", this, false);
this.updateReadPrefs();
}
-
if (AppConstants.MOZ_CRASHREPORTER) {
this.initSubmitCrashes();
}
this.initTelemetry();
if (AppConstants.MOZ_TELEMETRY_REPORTING) {
this.initSubmitHealthReport();
}
this.updateOnScreenKeyboardVisibility();
--- a/browser/components/preferences/in-content/advanced.xul
+++ b/browser/components/preferences/in-content/advanced.xul
@@ -36,84 +36,32 @@
<preference id="app.update.service.enabled"
name="app.update.service.enabled"
type="bool"/>
#endif
#endif
<preference id="browser.search.update"
name="browser.search.update"
- type="bool"/>
-
+ type="bool"/>
</preferences>
#ifdef HAVE_SHELL_SERVICE
<stringbundle id="bundleShell" src="chrome://browser/locale/shellservice.properties"/>
<stringbundle id="bundleBrand" src="chrome://branding/locale/brand.properties"/>
#endif
<hbox id="header-advanced"
class="header"
hidden="true"
data-category="paneAdvanced">
<label class="header-name" flex="1">&paneUpdates.title;</label>
<html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a>
</hbox>
-
-
- <!-- General -->
- <!-- Accessibility -->
- <!--<groupbox id="accessibilityGroup" align="start">
- <caption><label>&accessibility.label;</label></caption>
-
-#ifdef XP_WIN
- <checkbox id="useOnScreenKeyboard"
- hidden="true"
- label="&useOnScreenKeyboard.label;"
- accesskey="&useOnScreenKeyboard.accesskey;"
- preference="ui.osk.enabled"/>
-#endif
- <checkbox id="useCursorNavigation"
- label="&useCursorNavigation.label;"
- accesskey="&useCursorNavigation.accesskey;"
- preference="accessibility.browsewithcaret"/>
- <checkbox id="searchStartTyping"
- label="&searchOnStartTyping.label;"
- accesskey="&searchOnStartTyping.accesskey;"
- preference="accessibility.typeaheadfind"/>
- <checkbox id="blockAutoRefresh"
- label="&blockAutoReload.label;"
- accesskey="&blockAutoReload.accesskey;"
- preference="accessibility.blockautorefresh"/>
- </groupbox>-->
- <!-- Browsing -->
- <!--<groupbox id="browsingGroup" align="start">
- <caption><label>&browsing.label;</label></caption>
-
- <checkbox id="useAutoScroll"
- label="&useAutoScroll.label;"
- accesskey="&useAutoScroll.accesskey;"
- preference="general.autoScroll"/>
- <checkbox id="useSmoothScrolling"
- label="&useSmoothScrolling.label;"
- accesskey="&useSmoothScrolling.accesskey;"
- preference="general.smoothScroll"/>
- <checkbox id="allowHWAccel"
- label="&allowHWAccel.label;"
- accesskey="&allowHWAccel.accesskey;"
- preference="layers.acceleration.disabled"/>
- <checkbox id="checkSpelling"
- label="&checkUserSpelling.label;"
- accesskey="&checkUserSpelling.accesskey;"
- onsyncfrompreference="return gAdvancedPane.readCheckSpelling();"
- onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
- preference="layout.spellcheckDefault"/>
- </groupbox>-->
-
<!-- Update-->
#ifdef MOZ_UPDATER
<groupbox id="updateApp" align="start" data-category="paneAdvanced" hidden="true">
<caption><label>&updateApplication.label;</label></caption>
<radiogroup id="updateRadioGroup" align="start">
<radio id="autoDesktop"
value="auto"
label="&updateAuto1.label;"
--- a/browser/components/preferences/in-content/preferences.js
+++ b/browser/components/preferences/in-content/preferences.js
@@ -1,21 +1,18 @@
/* - This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
- You can obtain one at http://mozilla.org/MPL/2.0/. */
// Import globals from the files imported by the .xul files.
/* import-globals-from subdialogs.js */
/* import-globals-from advanced.js */
/* import-globals-from main.js */
-/* import-globals-from search.js */
-/* import-globals-from content.js */
/* import-globals-from privacy.js */
/* import-globals-from applications.js */
-/* import-globals-from security.js */
/* import-globals-from sync.js */
/* import-globals-from ../../../base/content/utilityOverlay.js */
"use strict";
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
@@ -127,31 +124,17 @@ function telemetryBucketForCategory(cate
case "search":
case "content":
case "applications":
case "privacy":
case "security":
case "sync":
return category;
case "advanced":
- let advancedPaneTabs = document.getElementById("advancedPrefs");
return "advancedGeneral";
- // switch (advancedPaneTabs.selectedTab.id) {
- // case "generalTab":
- // return "advancedGeneral";
- // case "dataChoicesTab":
- // return "advancedDataChoices";
- // case "networkTab":
- // return "advancedNetwork";
- // case "updateTab":
- // return "advancedUpdates";
- // case "encryptionTab":
- // return "advancedCerts";
- // }
- // fall-through for unknown.
default:
return "unknown";
}
}
function onHashChange() {
gotoPref();
}
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -4,19 +4,18 @@
Components.utils.import("resource://gre/modules/AppConstants.jsm");
Components.utils.import("resource://gre/modules/PluralForm.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
"resource://gre/modules/ContextualIdentityService.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
"resource://gre/modules/PluralForm.jsm");
-
XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
- "resource://gre/modules/LoginHelper.jsm");
+ "resource://gre/modules/LoginHelper.jsm");
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
XPCOMUtils.defineLazyGetter(this, "AlertsServiceDND", function() {
try {
let alertsService = Cc["@mozilla.org/alerts-service;1"]
.getService(Ci.nsIAlertsService)
.QueryInterface(Ci.nsIAlertsDoNotDisturb);
@@ -803,29 +802,29 @@ var gPrivacyPane = {
/*
* preferences:
*
* privacy.userContext.enabled
* - true if containers is enabled
*/
- /**
+ /**
* Enables/disables the Settings button used to configure containers
*/
readBrowserContainersCheckbox() {
var pref = document.getElementById("privacy.userContext.enabled");
var settings = document.getElementById("browserContainersSettings");
settings.disabled = !pref.value;
},
toggleDoNotDisturbNotifications(event) {
AlertsServiceDND.manualDoNotDisturb = event.target.checked;
- },
+ },
// NOTIFICATIONS
/**
* Displays the notifications exceptions dialog where specific site notification
* preferences can be set.
*/
showNotificationExceptions() {
@@ -1005,17 +1004,16 @@ var gPrivacyPane = {
let blockDownloadsPref = document.getElementById("browser.safebrowsing.downloads.enabled");
let malwareTable = document.getElementById("urlclassifier.malwareTable");
let blockUnwantedPref = document.getElementById("browser.safebrowsing.downloads.remote.block_potentially_unwanted");
let blockUncommonPref = document.getElementById("browser.safebrowsing.downloads.remote.block_uncommon");
enableSafeBrowsing.addEventListener("command", function() {
- debugger;
safeBrowsingPhishingPref.value = enableSafeBrowsing.checked;
safeBrowsingMalwarePref.value = enableSafeBrowsing.checked;
if (enableSafeBrowsing.checked) {
blockDownloads.removeAttribute("disabled");
if (blockDownloads.checked) {
blockUncommonUnwanted.removeAttribute("disabled");
}
@@ -1128,19 +1126,17 @@ var gPrivacyPane = {
/**
* Displays a dialog from which the user can manage his security devices.
*/
showSecurityDevices() {
gSubDialog.open("chrome://pippki/content/device_manager.xul");
},
-
- // NETWORK
-
+ // NETWORK
/**
* Displays a dialog in which proxy settings may be changed.
*/
showConnections() {
gSubDialog.open("chrome://browser/content/preferences/connection.xul");
},
/**
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -7,30 +7,28 @@
<script type="application/javascript"
src="chrome://browser/content/preferences/in-content/privacy.js"/>
<preferences id="privacyPreferences" hidden="true" data-category="panePrivacy">
<!-- Tracking -->
<preference id="privacy.trackingprotection.enabled"
name="privacy.trackingprotection.enabled"
- hidden="true"
+ hidden="true"
type="bool"/>
<preference id="privacy.trackingprotection.pbmode.enabled"
name="privacy.trackingprotection.pbmode.enabled"
hidden="true"
type="bool"/>
<!-- XXX button prefs -->
<preference id="pref.privacy.disable_button.cookie_exceptions"
- hidden="true"
name="pref.privacy.disable_button.cookie_exceptions"
type="bool"/>
<preference id="pref.privacy.disable_button.view_cookies"
- hidden="true"
name="pref.privacy.disable_button.view_cookies"
type="bool"/>
<preference id="pref.privacy.disable_button.change_blocklist"
name="pref.privacy.disable_button.change_blocklist"
type="bool"/>
<preference id="pref.privacy.disable_button.tracking_protection_exceptions"
name="pref.privacy.disable_button.tracking_protection_exceptions"
type="bool"/>
@@ -291,17 +289,17 @@
</vbox>
</vbox>
</deck>
</groupbox>
<!-- Passwords -->
<groupbox id="passwordsGroup" orient="vertical" data-category="panePrivacy" hidden="true">
- <caption><label>&logins.label;</label></caption>
+ <caption><label>&formsAndPasswords.label;</label></caption>
<hbox id="savePasswordsBox">
<checkbox id="savePasswords"
label="&rememberLogins.label;" accesskey="&rememberLogins.accesskey;"
preference="signon.rememberSignons"
onsyncfrompreference="return gPrivacyPane.readSavePasswords();"/>
<spacer flex="1"/>
<button id="passwordExceptions"
@@ -449,17 +447,17 @@
value="¬ificationsDoNotDisturbDetails.value;"/>
</vbox>
</row>
</rows>
</grid>
</groupbox>
-<!-- Location Bar -->
+ <!-- Location Bar -->
<groupbox id="locationBarGroup"
data-category="panePrivacy"
hidden="true">
<caption><label>&locationBar.label;</label></caption>
<label id="locationBarSuggestionLabel">&locbar.suggest.label;</label>
<checkbox id="historySuggestion" label="&locbar.history.label;"
accesskey="&locbar.history.accesskey;"
preference="browser.urlbar.suggest.history"/>
@@ -522,36 +520,36 @@
aria-labelledby="CertSelectionDesc">
<radio label="&selectCerts.auto;"
accesskey="&selectCerts.auto.accesskey;"
value="Select Automatically"/>
<radio label="&selectCerts.ask;"
accesskey="&selectCerts.ask.accesskey;"
value="Ask Every Time"/>
</radiogroup>
-<checkbox id="enableOCSP"
- label="&enableOCSP.label;"
- accesskey="&enableOCSP.accesskey;"
- onsyncfrompreference="return gPrivacyPane.readEnableOCSP();"
- onsynctopreference="return gPrivacyPane.writeEnableOCSP();"
- preference="security.OCSP.enabled"/>
-<separator/>
-<hbox>
- <button id="viewCertificatesButton"
- flex="1"
- label="&viewCerts.label;"
- accesskey="&viewCerts.accesskey;"
- preference="security.disable_button.openCertManager"/>
- <button id="viewSecurityDevicesButton"
- flex="1"
- label="&viewSecurityDevices.label;"
- accesskey="&viewSecurityDevices.accesskey;"
- preference="security.disable_button.openDeviceManager"/>
- <hbox flex="10"/>
- </hbox>
+ <checkbox id="enableOCSP"
+ label="&enableOCSP.label;"
+ accesskey="&enableOCSP.accesskey;"
+ onsyncfrompreference="return gPrivacyPane.readEnableOCSP();"
+ onsynctopreference="return gPrivacyPane.writeEnableOCSP();"
+ preference="security.OCSP.enabled"/>
+ <separator/>
+ <hbox>
+ <button id="viewCertificatesButton"
+ flex="1"
+ label="&viewCerts.label;"
+ accesskey="&viewCerts.accesskey;"
+ preference="security.disable_button.openCertManager"/>
+ <button id="viewSecurityDevicesButton"
+ flex="1"
+ label="&viewSecurityDevices.label;"
+ accesskey="&viewSecurityDevices.accesskey;"
+ preference="security.disable_button.openDeviceManager"/>
+ <hbox flex="10"/>
+ </hbox>
</groupbox>
<!-- DRM Content -->
<groupbox id="drmGroup" data-category="panePrivacy" hidden="true">
<caption><label>&drmContent.label;</label></caption>
<grid id="contentGrid2">
<columns>
<column flex="1"/>
--- a/browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js
+++ b/browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js
@@ -7,17 +7,16 @@ registerCleanupFunction(function() {
Services.prefs.clearUserPref("browser.preferences.instantApply");
});
add_task(function*() {
let prefs = yield openPreferencesViaOpenPreferencesAPI("panePrivacy");
is(prefs.selectedPane, "panePrivacy", "Privacy pane was selected");
prefs = yield openPreferencesViaOpenPreferencesAPI("advanced", undefined);
is(prefs.selectedPane, "paneAdvanced", "Advanced pane was selected");
- // is(prefs.selectedAdvancedTab, "updateTab", "The update tab within the advanced prefs should be selected");
prefs = yield openPreferencesViaHash("privacy");
is(prefs.selectedPane, "panePrivacy", "Privacy pane is selected when hash is 'privacy'");
prefs = yield openPreferencesViaOpenPreferencesAPI("nonexistant-category");
is(prefs.selectedPane, "paneGeneral", "General pane is selected by default when a nonexistant-category is requested");
prefs = yield openPreferencesViaHash("nonexistant-category");
is(prefs.selectedPane, "paneGeneral", "General pane is selected when hash is a nonexistant-category");
prefs = yield openPreferencesViaHash();
is(prefs.selectedPane, "paneGeneral", "General pane is selected by default");
--- a/browser/components/preferences/in-content/tests/browser_security.js
+++ b/browser/components/preferences/in-content/tests/browser_security.js
@@ -67,17 +67,17 @@ add_task(function*() {
let doc = gBrowser.selectedBrowser.contentDocument;
let checkbox = doc.getElementById("blockDownloads");
let blockUncommon = doc.getElementById("blockUncommonUnwanted");
let checked = checkbox.checked;
is(checked, val, "downloads preference is initialized correctly");
// should be disabled when val is false (= pref is turned off)
is(blockUncommon.hasAttribute("disabled"), !val, "block uncommon checkbox is set correctly");
- // scroll the checkbox into view and click it
+ // scroll the checkbox into view, otherwise the syntehsizeMouseAtCenter will be ignored, and click it
checkbox.scrollIntoView();
EventUtils.synthesizeMouseAtCenter(checkbox, {}, gBrowser.selectedBrowser.contentWindow);
// check that setting is now turned on or off
is(Services.prefs.getBoolPref("browser.safebrowsing.downloads.enabled"), !checked,
"safebrowsing.downloads preference is set correctly");
// check if the uncommon warning checkbox has updated
@@ -98,17 +98,17 @@ add_task(function*() {
yield openPreferencesViaOpenPreferencesAPI("privacy", undefined, { leaveOpen: true });
let doc = gBrowser.selectedBrowser.contentDocument;
let checkbox = doc.getElementById("blockUncommonUnwanted");
let checked = checkbox.checked;
is(checked, val1 && val2, "unwanted/uncommon preference is initialized correctly");
- // click the checkbox
+ // scroll the checkbox into view, otherwise the syntehsizeMouseAtCenter will be ignored, and click it
checkbox.scrollIntoView();
EventUtils.synthesizeMouseAtCenter(checkbox, {}, gBrowser.selectedBrowser.contentWindow);
// check that both settings are now turned on or off
is(Services.prefs.getBoolPref("browser.safebrowsing.downloads.remote.block_potentially_unwanted"), !checked,
"block_potentially_unwanted is set correctly");
is(Services.prefs.getBoolPref("browser.safebrowsing.downloads.remote.block_uncommon"), !checked,
"block_uncommon is set correctly");
--- a/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
@@ -36,17 +36,17 @@
<!ENTITY healthReportLearnMore.label "Learn More">
<!ENTITY telemetryDesc.label "Shares performance, usage, hardware and customization data about your browser with &vendorShortName; to help us make &brandShortName; better">
<!ENTITY enableTelemetryData.label "Share Additional Data (i.e., Telemetry)">
<!ENTITY enableTelemetryData.accesskey "T">
<!ENTITY telemetryLearnMore.label "Learn More">
<!ENTITY crashReporterDesc2.label "Crash reports help &vendorShortName; fix problems and make your browser more stable and secure">
-<!ENTITY alwaysSubmitCrashReports.label "Enable Crash Reporter">
+<!ENTITY alwaysSubmitCrashReports.label "Allow &brandShortName; to send backlogged crash reports on your behalf">
<!ENTITY alwaysSubmitCrashReports.accesskey "c">
<!ENTITY crashReporterLearnMore.label "Learn More">
<!ENTITY networkTab.label "Network">
<!ENTITY connection.label "Connection">
<!ENTITY connectionDesc.label "Configure how &brandShortName; connects to the Internet">
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.dtd
@@ -8,33 +8,22 @@
<!-- LOCALIZATION NOTE (prefWindow.titleGNOME): This is not used for in-content preferences -->
<!ENTITY prefWindow.titleGNOME "&brandShortName; Preferences">
<!-- When making changes to prefWindow.styleWin test both Windows Classic and
Luna since widget heights are different based on the OS theme -->
<!ENTITY prefWinMinSize.styleWin2 "width: 42em; min-height: 37.5em;">
<!ENTITY prefWinMinSize.styleMac "width: 47em; min-height: 40em;">
<!ENTITY prefWinMinSize.styleGNOME "width: 45.5em; min-height: 40.5em;">
-<!ENTITY paneGeneral.title "General">
-<!ENTITY paneTabs.title "Tabs">
-<!ENTITY paneSearch.title "Search">
-<!ENTITY paneContent.title "Content">
-<!ENTITY paneDownloadLinks.title "Downloads & Links">
-<!ENTITY panePrivacySecurity.title "Privacy & Security">
-<!ENTITY paneContainers.title "Container Tabs">
-<!ENTITY paneSecurity.title "Security">
-<!ENTITY paneUpdates.title "Updates">
+<!ENTITY paneGeneral.title "General">
+<!ENTITY paneTabs.title "Tabs">
+<!ENTITY paneSearch.title "Search">
+<!ENTITY paneContent.title "Content">
+<!ENTITY paneDownloadLinks.title "Downloads & Links">
+<!ENTITY panePrivacySecurity.title "Privacy & Security">
+<!ENTITY paneContainers.title "Container Tabs">
+<!ENTITY paneSecurity.title "Security">
+<!ENTITY paneUpdates.title "Updates">
<!-- LOCALIZATION NOTE (paneSync.title): This should match syncBrand.shortName.label in ../syncBrand.dtd -->
<!ENTITY paneSync.title "Firefox Account">
<!ENTITY helpButton.label "Help">
-
-
-<!--<!ENTITY paneGeneral.title "General">
-<!ENTITY paneTabs.title "Tabs">
-<!ENTITY paneSearch.title "Search">
-<!ENTITY paneContent.title "Content">
-<!ENTITY paneDownloadLinks.title "Downloads & Links">
-<!ENTITY panePrivacySecurity.title "Privacy & Security">
-<!ENTITY paneContainers.title "Container Tabs">
-<!ENTITY paneSecurity.title "Security">
-<!ENTITY paneUpdates.title "Updates">-->
\ No newline at end of file
--- a/browser/locales/en-US/chrome/browser/preferences/security.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/security.dtd
@@ -19,17 +19,17 @@
<!ENTITY blockUncommonAndUnwanted.label "Warn you about unwanted and uncommon software">
<!ENTITY blockUncommonAndUnwanted.accesskey "C">
<!ENTITY addonExceptions.label "Exceptions…">
<!ENTITY addonExceptions.accesskey "E">
-<!ENTITY logins.label "Forms & Passwords">
+<!ENTITY formsAndPasswords.label "Forms & Passwords">
<!ENTITY rememberLogins.label "Remember logins and passwords for sites">
<!ENTITY rememberLogins.accesskey "R">
<!ENTITY passwordExceptions.label "Exceptions…">
<!ENTITY passwordExceptions.accesskey "x">
<!ENTITY useMasterPassword.label "Use a master password">
<!ENTITY useMasterPassword.accesskey "U">