--- a/.eslintignore
+++ b/.eslintignore
@@ -270,17 +270,16 @@ js/src/jit-test/**
js/src/tests/**
js/src/Y.js
# mobile/android/ exclusions
mobile/android/tests/browser/chrome/tp5/**
# Uses `#filter substitution`
mobile/android/app/mobile.js
-mobile/android/chrome/content/healthreport-prefs.js
# Uses `#expand`
mobile/android/chrome/content/about.js
# Not much JS to lint and non-standard at that
mobile/android/installer/
mobile/android/locales/
deleted file mode 100644
--- a/browser/base/content/abouthealthreport/abouthealth.css
+++ /dev/null
@@ -1,15 +0,0 @@
-* {
- margin: 0;
- padding: 0;
-}
-
-html, body {
- height: 100%;
-}
-
-#remote-report {
- width: 100%;
- height: 100%;
- border: 0;
- display: flex;
-}
deleted file mode 100644
--- a/browser/base/content/abouthealthreport/abouthealth.js
+++ /dev/null
@@ -1,172 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-const PREF_REPORTING_URL = "datareporting.healthreport.about.reportUrl";
-
-var healthReportWrapper = {
- init() {
- let iframe = document.getElementById("remote-report");
- iframe.addEventListener("load", healthReportWrapper.initRemotePage);
- iframe.src = this._getReportURI().spec;
- XPCOMUtils.defineLazyPreferenceGetter(this, /* unused */ "_isUploadEnabled",
- "datareporting.healthreport.uploadEnabled",
- false, () => this.updatePrefState());
- },
-
- _getReportURI() {
- let url = Services.urlFormatter.formatURLPref(PREF_REPORTING_URL);
- return Services.io.newURI(url);
- },
-
- setDataSubmission(enabled) {
- MozSelfSupport.healthReportDataSubmissionEnabled = enabled;
- this.updatePrefState();
- },
-
- updatePrefState() {
- try {
- let prefsObj = {
- enabled: MozSelfSupport.healthReportDataSubmissionEnabled,
- };
- healthReportWrapper.injectData("prefs", prefsObj);
- } catch (ex) {
- healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PREFS_FAILED);
- }
- },
-
- sendTelemetryPingList() {
- console.log("AboutHealthReport: Collecting Telemetry ping list.");
- MozSelfSupport.getTelemetryPingList().then((list) => {
- console.log("AboutHealthReport: Sending Telemetry ping list.");
- this.injectData("telemetry-ping-list", list);
- }).catch((ex) => {
- console.log("AboutHealthReport: Collecting ping list failed: " + ex);
- });
- },
-
- sendTelemetryPingData(pingId) {
- console.log("AboutHealthReport: Collecting Telemetry ping data.");
- MozSelfSupport.getTelemetryPing(pingId).then((ping) => {
- console.log("AboutHealthReport: Sending Telemetry ping data.");
- this.injectData("telemetry-ping-data", {
- id: pingId,
- pingData: ping,
- });
- }).catch((ex) => {
- console.log("AboutHealthReport: Loading ping data failed: " + ex);
- this.injectData("telemetry-ping-data", {
- id: pingId,
- error: "error-generic",
- });
- });
- },
-
- sendCurrentEnvironment() {
- console.log("AboutHealthReport: Sending Telemetry environment data.");
- MozSelfSupport.getCurrentTelemetryEnvironment().then((environment) => {
- this.injectData("telemetry-current-environment-data", environment);
- }).catch((ex) => {
- console.log("AboutHealthReport: Collecting current environment data failed: " + ex);
- });
- },
-
- sendCurrentPingData() {
- console.log("AboutHealthReport: Sending current Telemetry ping data.");
- MozSelfSupport.getCurrentTelemetrySubsessionPing().then((ping) => {
- this.injectData("telemetry-current-ping-data", ping);
- }).catch((ex) => {
- console.log("AboutHealthReport: Collecting current ping data failed: " + ex);
- });
- },
-
- injectData(type, content) {
- let report = this._getReportURI();
-
- // file URIs can't be used for targetOrigin, so we use "*" for this special case
- // in all other cases, pass in the URL to the report so we properly restrict the message dispatch
- let reportUrl = report.scheme == "file" ? "*" : report.spec;
-
- let data = {
- type,
- content
- };
-
- let iframe = document.getElementById("remote-report");
- iframe.contentWindow.postMessage(data, reportUrl);
- },
-
- handleRemoteCommand(evt) {
- // Do an origin check to harden against the frame content being loaded from unexpected locations.
- let allowedPrincipal = Services.scriptSecurityManager.createCodebasePrincipal(this._getReportURI(), {});
- let targetPrincipal = evt.target.nodePrincipal;
- if (!allowedPrincipal.equals(targetPrincipal)) {
- Cu.reportError(`Origin check failed for message "${evt.detail.command}": ` +
- `target origin is "${targetPrincipal.origin}", expected "${allowedPrincipal.origin}"`);
- return;
- }
-
- switch (evt.detail.command) {
- case "DisableDataSubmission":
- this.setDataSubmission(false);
- break;
- case "EnableDataSubmission":
- this.setDataSubmission(true);
- break;
- case "RequestCurrentPrefs":
- this.updatePrefState();
- break;
- case "RequestTelemetryPingList":
- this.sendTelemetryPingList();
- break;
- case "RequestTelemetryPingData":
- this.sendTelemetryPingData(evt.detail.id);
- break;
- case "RequestCurrentEnvironment":
- this.sendCurrentEnvironment();
- break;
- case "RequestCurrentPingData":
- this.sendCurrentPingData();
- break;
- default:
- Cu.reportError("Unexpected remote command received: " + evt.detail.command + ". Ignoring command.");
- break;
- }
- },
-
- initRemotePage() {
- let iframe = document.getElementById("remote-report").contentDocument;
- iframe.addEventListener("RemoteHealthReportCommand",
- function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); });
- healthReportWrapper.updatePrefState();
- },
-
- // error handling
- ERROR_INIT_FAILED: 1,
- ERROR_PAYLOAD_FAILED: 2,
- ERROR_PREFS_FAILED: 3,
-
- reportFailure(error) {
- let details = {
- errorType: error,
- };
- healthReportWrapper.injectData("error", details);
- },
-
- handleInitFailure() {
- healthReportWrapper.reportFailure(healthReportWrapper.ERROR_INIT_FAILED);
- },
-
- handlePayloadFailure() {
- healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PAYLOAD_FAILED);
- },
-};
-
-window.addEventListener("load", function() { healthReportWrapper.init(); });
deleted file mode 100644
--- a/browser/base/content/abouthealthreport/abouthealth.xhtml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 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/. -->
-<!DOCTYPE html [
- <!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
- %htmlDTD;
- <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
- %brandDTD;
- <!ENTITY % securityPrefsDTD SYSTEM "chrome://browser/locale/preferences/security.dtd">
- %securityPrefsDTD;
- <!ENTITY % aboutHealthReportDTD SYSTEM "chrome://browser/locale/aboutHealthReport.dtd">
- %aboutHealthReportDTD;
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>&abouthealth.pagetitle;</title>
- <link rel="icon" type="image/png" id="favicon"
- href="chrome://branding/content/icon32.png"/>
- <link rel="stylesheet"
- href="chrome://browser/content/abouthealthreport/abouthealth.css"
- type="text/css" />
- <script type="text/javascript"
- src="chrome://browser/content/abouthealthreport/abouthealth.js" />
- </head>
- <body>
- <iframe id="remote-report"/>
- </body>
-</html>
-
--- a/browser/base/content/baseMenuOverlay.xul
+++ b/browser/base/content/baseMenuOverlay.xul
@@ -56,23 +56,16 @@
oncommand="openTourPage();"
label="&helpShowTour2.label;"
accesskey="&helpShowTour2.accesskey;"/>
<menuitem id="menu_keyboardShortcuts"
oncommand="openHelpLink('keyboard-shortcuts')"
onclick="checkForMiddleClick(this, event);"
label="&helpKeyboardShortcuts.label;"
accesskey="&helpKeyboardShortcuts.accesskey;"/>
-#ifdef MOZ_SERVICES_HEALTHREPORT
- <menuitem id="healthReport"
- label="&healthReport2.label;"
- accesskey="&healthReport2.accesskey;"
- oncommand="openHealthReport()"
- onclick="checkForMiddleClick(this, event);"/>
-#endif
<menuitem id="troubleShooting"
accesskey="&helpTroubleshootingInfo.accesskey;"
label="&helpTroubleshootingInfo.label;"
oncommand="openTroubleshootingPage()"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="feedbackPage"
accesskey="&helpFeedbackPage.accesskey;"
label="&helpFeedbackPage.label;"
--- a/browser/base/content/moz.build
+++ b/browser/base/content/moz.build
@@ -2,19 +2,16 @@
# vim: set filetype=python:
# 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/.
with Files("**"):
BUG_COMPONENT = ("Firefox", "General")
-with Files("abouthealthreport/**"):
- BUG_COMPONENT = ("Firefox Health Report", "Client: Desktop")
-
with Files("defaultthemes/**"):
BUG_COMPONENT = ("Firefox", "Theme")
with Files("docs/**"):
BUG_COMPONENT = ("Core", "Security")
with Files("newtab/**"):
BUG_COMPONENT = ("Firefox", "New Tab Page")
--- a/browser/base/content/test/about/browser.ini
+++ b/browser/base/content/test/about/browser.ini
@@ -1,23 +1,19 @@
[DEFAULT]
support-files =
aboutHome_content_script.js
head.js
- healthreport_pingData.js
- healthreport_testRemoteCommands.html
print_postdata.sjs
searchSuggestionEngine.sjs
searchSuggestionEngine.xml
test_bug959531.html
POSTSearchEngine.xml
[browser_aboutCertError.js]
-[browser_aboutHealthReport.js]
-skip-if = os == "linux" # Bug 924307
[browser_aboutHome_imitate.js]
[browser_aboutHome_input.js]
skip-if = os == "win" && debug && !e10s # Bug 1399648
[browser_aboutHome_search_POST.js]
[browser_aboutHome_search_composing.js]
skip-if = !debug && (os == "mac" || (os == "linux" && bits == 32)) # Bug 1400491, bug 1399648
[browser_aboutHome_search_searchbar.js]
[browser_aboutHome_search_suggestion.js]
deleted file mode 100644
--- a/browser/base/content/test/about/browser_aboutHealthReport.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-
-const CHROME_BASE = "chrome://mochitests/content/browser/browser/base/content/test/about/";
-const HTTPS_BASE = "https://example.com/browser/browser/base/content/test/about/";
-
-const TELEMETRY_LOG_PREF = "toolkit.telemetry.log.level";
-const telemetryOriginalLogPref = Services.prefs.getStringPref(TELEMETRY_LOG_PREF, null);
-
-const originalReportUrl = Services.prefs.getCharPref("datareporting.healthreport.about.reportUrl");
-
-registerCleanupFunction(function() {
- // Ensure we don't pollute prefs for next tests.
- if (telemetryOriginalLogPref) {
- Services.prefs.setStringPref(TELEMETRY_LOG_PREF, telemetryOriginalLogPref);
- } else {
- Services.prefs.clearUserPref(TELEMETRY_LOG_PREF);
- }
-
- try {
- Services.prefs.setCharPref("datareporting.healthreport.about.reportUrl", originalReportUrl);
- Services.prefs.setBoolPref("datareporting.healthreport.uploadEnabled", true);
- } catch (ex) {}
-});
-
-function fakeTelemetryNow(...args) {
- let date = new Date(...args);
- let scope = {};
- const modules = [
- Cu.import("resource://gre/modules/TelemetrySession.jsm", scope),
- Cu.import("resource://gre/modules/TelemetryEnvironment.jsm", scope),
- Cu.import("resource://gre/modules/TelemetryController.jsm", scope),
- ];
-
- for (let m of modules) {
- m.Policy.now = () => new Date(date);
- }
-
- return date;
-}
-
-async function setupPingArchive() {
- let scope = {};
- Cu.import("resource://gre/modules/TelemetryController.jsm", scope);
- Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
- .loadSubScript(CHROME_BASE + "healthreport_pingData.js", scope);
-
- for (let p of scope.TEST_PINGS) {
- fakeTelemetryNow(p.date);
- p.id = await scope.TelemetryController.submitExternalPing(p.type, p.payload);
- }
-}
-
-var gTests = [
-
-{
- desc: "Test the remote commands",
- async setup() {
- Services.prefs.setStringPref(TELEMETRY_LOG_PREF, "Trace");
- await setupPingArchive();
- Services.prefs.setCharPref("datareporting.healthreport.about.reportUrl",
- HTTPS_BASE + "healthreport_testRemoteCommands.html");
- },
- run(iframe) {
- return new Promise((resolve, reject) => {
- let results = 0;
- try {
- iframe.contentWindow.addEventListener("FirefoxHealthReportTestResponse", function evtHandler(event) {
- let data = event.detail.data;
- if (data.type == "testResult") {
- ok(data.pass, data.info);
- results++;
- } else if (data.type == "testsComplete") {
- is(results, data.count, "Checking number of results received matches the number of tests that should have run");
- iframe.contentWindow.removeEventListener("FirefoxHealthReportTestResponse", evtHandler, true);
- resolve();
- }
- }, true);
-
- } catch (e) {
- ok(false, "Failed to get all commands");
- reject();
- }
- });
- }
-},
-
-]; // gTests
-
-function test() {
- waitForExplicitFinish();
-
- // xxxmpc leaving this here until we resolve bug 854038 and bug 854060
- requestLongerTimeout(10);
-
- (async function() {
- for (let testCase of gTests) {
- info(testCase.desc);
- await testCase.setup();
-
- let iframe = await promiseNewTabLoadEvent("about:healthreport");
-
- await testCase.run(iframe);
-
- gBrowser.removeCurrentTab();
- }
-
- finish();
- })();
-}
-
-function promiseNewTabLoadEvent(aUrl, aEventType = "load") {
- return new Promise(resolve => {
- let tab = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, aUrl);
- tab.linkedBrowser.addEventListener(aEventType, function(event) {
- let iframe = tab.linkedBrowser.contentDocument.getElementById("remote-report");
- iframe.addEventListener("load", function frameLoad(e) {
- if (iframe.contentWindow.location.href == "about:blank" ||
- e.target != iframe) {
- return;
- }
- iframe.removeEventListener("load", frameLoad);
- resolve(iframe);
- });
- }, {capture: true, once: true});
- });
-}
deleted file mode 100644
--- a/browser/base/content/test/about/healthreport_pingData.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var TEST_PINGS = [
- {
- type: "test-telemetryArchive-1",
- payload: { foo: "bar" },
- date: new Date(2010, 1, 1, 10, 0, 0),
- },
- {
- type: "test-telemetryArchive-2",
- payload: { x: { y: "z"} },
- date: new Date(2010, 1, 1, 11, 0, 0),
- },
- {
- type: "test-telemetryArchive-3",
- payload: { moo: "meh" },
- date: new Date(2010, 1, 1, 12, 0, 0),
- },
-];
deleted file mode 100644
--- a/browser/base/content/test/about/healthreport_testRemoteCommands.html
+++ /dev/null
@@ -1,243 +0,0 @@
-<html>
- <head>
- <meta charset="utf-8">
-<script type="application/javascript"
- src="healthreport_pingData.js">
-</script>
-<script type="application/javascript">
-/* import-globals-from healthreport_pingData.js */
-function init() {
- window.addEventListener("message", doTest);
- doTest();
-}
-
-function checkSubmissionValue(payload, expectedValue) {
- return payload.enabled == expectedValue;
-}
-
-function isArray(arg) {
- return Object.prototype.toString.call(arg) === "[object Array]";
-}
-
-function writeDiagnostic(text) {
- let node = document.createTextNode(text);
- let br = document.createElement("br");
- document.body.appendChild(node);
- document.body.appendChild(br);
-}
-
-function validateCurrentTelemetryEnvironment(data) {
- // Simple check for now: check that the received object has the expected
- // top-level properties.
- const expectedKeys = ["profile", "settings", "system", "build", "partner", "addons"];
- return expectedKeys.every(key => (key in data));
-}
-
-function validateCurrentTelemetryPingData(ping) {
- // Simple check for now: check that the received object has the expected
- // top-level properties and that the type and reason match.
- const expectedKeys = ["environment", "clientId", "payload", "application",
- "version", "type", "id"];
- return expectedKeys.every(key => (key in ping)) &&
- (ping.type == "main") &&
- ("info" in ping.payload) &&
- ("reason" in ping.payload.info) &&
- (ping.payload.info.reason == "gather-subsession-payload");
-}
-
-function validateTelemetryPingList(list) {
- if (!isArray(list)) {
- console.log("Telemetry ping list is not an array.");
- return false;
- }
-
- // Telemetry may generate other pings (e.g. "deletion" pings), so filter those
- // out.
- const TEST_TYPES_REGEX = /^test-telemetryArchive/;
- list = list.filter(p => TEST_TYPES_REGEX.test(p.type));
-
- if (list.length != TEST_PINGS.length) {
- console.log("Telemetry ping length is not correct.");
- return false;
- }
-
- let valid = true;
- for (let i = 0; i < list.length; ++i) {
- let received = list[i];
- let expected = TEST_PINGS[i];
- if (received.type != expected.type ||
- received.timestampCreated != expected.date.getTime()) {
- writeDiagnostic("Telemetry ping " + i + " does not match.");
- writeDiagnostic("Expected: " + JSON.stringify(expected));
- writeDiagnostic("Received: " + JSON.stringify(received));
- valid = false;
- } else {
- writeDiagnostic("Telemetry ping " + i + " matches.");
- }
- }
-
- return valid;
-}
-
-function validateTelemetryPingData(expected, received) {
- const receivedDate = new Date(received.creationDate);
- if (received.id != expected.id ||
- received.type != expected.type ||
- receivedDate.getTime() != expected.date.getTime()) {
- writeDiagnostic("Telemetry ping data for " + expected.id + " doesn't match.");
- writeDiagnostic("Expected: " + JSON.stringify(expected));
- writeDiagnostic("Received: " + JSON.stringify(received));
- return false;
- }
-
- writeDiagnostic("Telemetry ping data for " + expected.id + " matched.");
- return true;
-}
-
-var tests = [
-{
- info: "Checking initial value is enabled",
- event: "RequestCurrentPrefs",
- payloadType: "prefs",
- validateResponse(payload) {
- return checkSubmissionValue(payload, true);
- },
-},
-{
- info: "Verifying disabling works",
- event: "DisableDataSubmission",
- payloadType: "prefs",
- validateResponse(payload) {
- return checkSubmissionValue(payload, false);
- },
-},
-{
- info: "Verifying we're still disabled",
- event: "RequestCurrentPrefs",
- payloadType: "prefs",
- validateResponse(payload) {
- return checkSubmissionValue(payload, false);
- },
-},
-{
- info: "Verifying that we can get the current ping data while submission is disabled",
- event: "RequestCurrentPingData",
- payloadType: "telemetry-current-ping-data",
- validateResponse(payload) {
- return validateCurrentTelemetryPingData(payload);
- },
-},
-{
- info: "Verifying enabling works",
- event: "EnableDataSubmission",
- payloadType: "prefs",
- validateResponse(payload) {
- return checkSubmissionValue(payload, true);
- },
-},
-{
- info: "Verifying we're still re-enabled",
- event: "RequestCurrentPrefs",
- payloadType: "prefs",
- validateResponse(payload) {
- return checkSubmissionValue(payload, true);
- },
-},
-{
- info: "Verifying that we can get the current Telemetry environment data",
- event: "RequestCurrentEnvironment",
- payloadType: "telemetry-current-environment-data",
- validateResponse(payload) {
- return validateCurrentTelemetryEnvironment(payload);
- },
-},
-{
- info: "Verifying that we can get the current Telemetry ping data",
- event: "RequestCurrentPingData",
- payloadType: "telemetry-current-ping-data",
- validateResponse(payload) {
- return validateCurrentTelemetryPingData(payload);
- },
-},
-{
- info: "Verifying that we get the proper Telemetry ping list",
- event: "RequestTelemetryPingList",
- payloadType: "telemetry-ping-list",
- validateResponse(payload) {
- // Validate the ping list
- if (!validateTelemetryPingList(payload)) {
- return false;
- }
-
- // Now that we received the ping ids, set up additional test tasks
- // that check loading the individual pings.
- for (let i = 0; i < TEST_PINGS.length; ++i) {
- TEST_PINGS[i].id = payload[i].id;
- tests.push({
- info: "Verifying that we can get the proper Telemetry ping data #" + (i + 1),
- event: "RequestTelemetryPingData",
- eventData: { id: TEST_PINGS[i].id },
- payloadType: "telemetry-ping-data",
- validateResponse(payload2) {
- return validateTelemetryPingData(TEST_PINGS[i], payload2.pingData);
- },
- });
- }
-
- return true;
- },
-},
-];
-
-var currentTest = -1;
-function doTest(evt) {
- if (evt) {
- if (currentTest < 0 || !evt.data.content)
- return; // not yet testing
-
- var test = tests[currentTest];
- if (evt.data.type != test.payloadType)
- return; // skip unrequested events
-
- var error = JSON.stringify(evt.data.content);
- var pass = false;
- try {
- pass = test.validateResponse(evt.data.content);
- } catch (e) {}
- reportResult(test.info, pass, error);
- }
- // start the next test if there are any left
- if (tests[++currentTest])
- sendToBrowser(tests[currentTest].event, tests[currentTest].eventData);
- else
- reportFinished();
-}
-
-function reportResult(info, pass, error) {
- var data = {type: "testResult", info, pass, error};
- var event = new CustomEvent("FirefoxHealthReportTestResponse", {detail: {data}, bubbles: true});
- document.dispatchEvent(event);
-}
-
-function reportFinished(cmd) {
- var data = {type: "testsComplete", count: tests.length};
- var event = new CustomEvent("FirefoxHealthReportTestResponse", {detail: {data}, bubbles: true});
- document.dispatchEvent(event);
-}
-
-function sendToBrowser(type, eventData) {
- eventData = eventData || {};
- let detail = {command: type};
- for (let key of Object.keys(eventData)) {
- detail[key] = eventData[key];
- }
-
- var event = new CustomEvent("RemoteHealthReportCommand", {detail, bubbles: true});
- document.dispatchEvent(event);
-}
-
-</script>
- </head>
- <body onload="init()">
- </body>
-</html>
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -814,24 +814,16 @@ function openPreferences(paneID, extraAr
* Opens the troubleshooting information (about:support) page for this version
* of the application.
*/
function openTroubleshootingPage() {
openUILinkIn("about:support", "tab");
}
/**
- * Opens the troubleshooting information (about:support) page for this version
- * of the application.
- */
-function openHealthReport() {
- openUILinkIn("about:healthreport", "tab");
-}
-
-/**
* Opens the feedback page for this version of the application.
*/
function openFeedbackPage() {
var url = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
.getService(Components.interfaces.nsIURLFormatter)
.formatURLPref("app.feedback.baseURL");
openUILinkIn(url, "tab");
}
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -37,23 +37,16 @@ browser.jar:
content/browser/abouthome/settings@2x.png (content/abouthome/settings@2x.png)
content/browser/abouthome/restore@2x.png (content/abouthome/restore@2x.png)
content/browser/abouthome/restore-large@2x.png (content/abouthome/restore-large@2x.png)
content/browser/illustrations/error-connection-failure.svg (content/illustrations/error-connection-failure.svg)
content/browser/illustrations/error-server-not-found.svg (content/illustrations/error-server-not-found.svg)
content/browser/illustrations/error-malformed-url.svg (content/illustrations/error-malformed-url.svg)
content/browser/aboutNetError.xhtml (content/aboutNetError.xhtml)
-
-#ifdef MOZ_SERVICES_HEALTHREPORT
- content/browser/abouthealthreport/abouthealth.xhtml (content/abouthealthreport/abouthealth.xhtml)
- content/browser/abouthealthreport/abouthealth.js (content/abouthealthreport/abouthealth.js)
- content/browser/abouthealthreport/abouthealth.css (content/abouthealthreport/abouthealth.css)
-#endif
-
content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
content/browser/aboutTabCrashed.css (content/aboutTabCrashed.css)
content/browser/aboutTabCrashed.js (content/aboutTabCrashed.js)
content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml)
* content/browser/browser.css (content/browser.css)
content/browser/browser.js (content/browser.js)
* content/browser/browser.xul (content/browser.xul)
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -86,20 +86,16 @@ static const RedirEntry kRedirMap[] = {
nsIAboutModule::ENABLE_INDEXED_DB },
// the newtab's actual URL will be determined when the channel is created
{ "newtab", "about:blank",
nsIAboutModule::ALLOW_SCRIPT },
{ "preferences", "chrome://browser/content/preferences/in-content/preferences.xul",
nsIAboutModule::ALLOW_SCRIPT },
{ "downloads", "chrome://browser/content/downloads/contentAreaDownloadsView.xul",
nsIAboutModule::ALLOW_SCRIPT },
-#ifdef MOZ_SERVICES_HEALTHREPORT
- { "healthreport", "chrome://browser/content/abouthealthreport/abouthealth.xhtml",
- nsIAboutModule::ALLOW_SCRIPT },
-#endif
{ "reader", "chrome://global/content/reader/aboutReader.html",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::ALLOW_SCRIPT |
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
nsIAboutModule::HIDE_FROM_ABOUTABOUT },
};
static nsAutoCString
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -100,19 +100,16 @@ static const mozilla::Module::ContractID
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "robots", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "searchreset", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "welcomeback", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "home", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "newtab", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "preferences", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "downloads", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
-#ifdef MOZ_SERVICES_HEALTHREPORT
- { NS_ABOUT_MODULE_CONTRACTID_PREFIX "healthreport", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
-#endif
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "reader", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
#if defined(XP_WIN)
{ NS_IEHISTORYENUMERATOR_CONTRACTID, &kNS_WINIEHISTORYENUMERATOR_CID },
#elif defined(XP_MACOSX)
{ NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
#endif
{ nullptr }
};
deleted file mode 100644
--- a/browser/locales/en-US/chrome/browser/aboutHealthReport.dtd
+++ /dev/null
@@ -1,6 +0,0 @@
-<!-- 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/. -->
-
-<!-- LOCALIZATION NOTE (abouthealth.pagetitle): Firefox Health Report is a proper noun in en-US, please keep this in mind. -->
-<!ENTITY abouthealth.pagetitle "&brandShortName; Health Report">
--- a/browser/locales/en-US/chrome/browser/baseMenuOverlay.dtd
+++ b/browser/locales/en-US/chrome/browser/baseMenuOverlay.dtd
@@ -23,19 +23,16 @@
<!ENTITY helpKeyboardShortcuts.label "Keyboard Shortcuts">
<!ENTITY helpKeyboardShortcuts.accesskey "K">
<!ENTITY helpSafeMode.label "Restart with Add-ons Disabled…">
<!ENTITY helpSafeMode.accesskey "R">
<!ENTITY helpSafeMode.stop.label "Restart with Add-ons Enabled">
<!ENTITY helpSafeMode.stop.accesskey "R">
-<!ENTITY healthReport2.label "&brandShorterName; Health Report">
-<!ENTITY healthReport2.accesskey "e">
-
<!ENTITY helpTroubleshootingInfo.label "Troubleshooting Information">
<!ENTITY helpTroubleshootingInfo.accesskey "T">
<!ENTITY helpFeedbackPage.label "Submit Feedback…">
<!ENTITY helpFeedbackPage.accesskey "S">
<!ENTITY helpShowTour2.label "&brandShorterName; Tour">
<!ENTITY helpShowTour2.accesskey "o">
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -14,19 +14,16 @@
% locale browser @AB_CD@ %locale/browser/
* locale/browser/bookmarks.html (generic/profile/bookmarks.html.in)
locale/browser/aboutDialog.dtd (%chrome/browser/aboutDialog.dtd)
locale/browser/aboutPrivateBrowsing.dtd (%chrome/browser/aboutPrivateBrowsing.dtd)
locale/browser/aboutPrivateBrowsing.properties (%chrome/browser/aboutPrivateBrowsing.properties)
locale/browser/aboutRobots.dtd (%chrome/browser/aboutRobots.dtd)
locale/browser/aboutHome.dtd (%chrome/browser/aboutHome.dtd)
locale/browser/accounts.properties (%chrome/browser/accounts.properties)
-#ifdef MOZ_SERVICES_HEALTHREPORT
- locale/browser/aboutHealthReport.dtd (%chrome/browser/aboutHealthReport.dtd)
-#endif
locale/browser/aboutSearchReset.dtd (%chrome/browser/aboutSearchReset.dtd)
locale/browser/aboutSessionRestore.dtd (%chrome/browser/aboutSessionRestore.dtd)
locale/browser/aboutTabCrashed.dtd (%chrome/browser/aboutTabCrashed.dtd)
locale/browser/browser.dtd (%chrome/browser/browser.dtd)
locale/browser/baseMenuOverlay.dtd (%chrome/browser/baseMenuOverlay.dtd)
locale/browser/browser.properties (%chrome/browser/browser.properties)
locale/browser/customizableui/customizableWidgets.properties (%chrome/browser/customizableui/customizableWidgets.properties)
locale/browser/lightweightThemes.properties (%chrome/browser/lightweightThemes.properties)
--- a/docshell/test/browser/browser_bug1309900_crossProcessHistoryNavigation.js
+++ b/docshell/test/browser/browser_bug1309900_crossProcessHistoryNavigation.js
@@ -8,28 +8,32 @@ add_task(async function runTests() {
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:about");
registerCleanupFunction(function() {
gBrowser.removeTab(tab);
});
let browser = tab.linkedBrowser;
- browser.loadURI("about:healthreport");
- let href = await BrowserTestUtils.browserLoaded(browser);
- is(href, "about:healthreport", "Check about:healthreport loaded");
+ let loaded = BrowserTestUtils.browserLoaded(browser);
+ browser.loadURI("about:config");
+ let href = await loaded;
+ is(href, "about:config", "Check about:config loaded");
// Using a dummy onunload listener to disable the bfcache as that can prevent
// the test browser load detection mechanism from working.
+ loaded = BrowserTestUtils.browserLoaded(browser);
browser.loadURI("data:text/html,<body%20onunload=''><iframe></iframe></body>");
- href = await BrowserTestUtils.browserLoaded(browser);
+ href = await loaded;
is(href, "data:text/html,<body%20onunload=''><iframe></iframe></body>",
"Check data URL loaded");
+ loaded = BrowserTestUtils.browserLoaded(browser);
browser.goBack();
- href = await BrowserTestUtils.browserLoaded(browser);
- is(href, "about:healthreport", "Check we've gone back to about:healthreport");
+ href = await loaded;
+ is(href, "about:config", "Check we've gone back to about:config");
+ loaded = BrowserTestUtils.browserLoaded(browser);
browser.goForward();
- href = await BrowserTestUtils.browserLoaded(browser);
+ href = await loaded;
is(href, "data:text/html,<body%20onunload=''><iframe></iframe></body>",
"Check we've gone forward to data URL");
});
--- a/mobile/android/app/src/main/res/xml/preferences_privacy.xml
+++ b/mobile/android/app/src/main/res/xml/preferences_privacy.xml
@@ -91,18 +91,13 @@
android:persistent="false"
url="https://location.services.mozilla.com/" />
<CheckBoxPreference android:key="android.not_a_preference.healthreport.uploadEnabled"
android:title="@string/datareporting_fhr_title"
android:summary="@string/datareporting_fhr_summary2"
android:defaultValue="true" />
- <org.mozilla.gecko.preferences.AlignRightLinkPreference android:key="android.not_a_preference.healthreport.link"
- android:title="@string/datareporting_abouthr_title"
- android:persistent="false"
- url="about:healthreport" />
-
</PreferenceCategory>
</PreferenceScreen>
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestAboutPagesPreparer.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestAboutPagesPreparer.java
@@ -14,17 +14,16 @@ import org.robolectric.RuntimeEnvironmen
@RunWith(TestRunner.class)
public class TestAboutPagesPreparer {
private static final String[] ABOUT_PAGES = {
AboutPages.ACCOUNTS,
AboutPages.ADDONS,
AboutPages.CONFIG,
AboutPages.DOWNLOADS,
AboutPages.FIREFOX,
- AboutPages.HEALTHREPORT,
AboutPages.HOME
};
@Test
public void testPreparerAddsUrlsForAllAboutPages() {
final Preparer preparer = new AboutPagesPreparer();
for (String url : ABOUT_PAGES) {
--- a/mobile/android/base/java/org/mozilla/gecko/AboutPages.java
+++ b/mobile/android/base/java/org/mozilla/gecko/AboutPages.java
@@ -16,17 +16,16 @@ import java.util.List;
public class AboutPages {
// All of our special pages.
public static final String ACCOUNTS = "about:accounts";
public static final String ADDONS = "about:addons";
public static final String CONFIG = "about:config";
public static final String DOWNLOADS = "about:downloads";
public static final String FIREFOX = "about:firefox";
- public static final String HEALTHREPORT = "about:healthreport";
public static final String HOME = "about:home";
public static final String LOGINS = "about:logins";
public static final String PRIVATEBROWSING = "about:privatebrowsing";
public static final String READER = "about:reader";
public static final String URL_FILTER = "about:%";
public static final String PANEL_PARAM = "panel";
@@ -76,18 +75,17 @@ public class AboutPages {
}
public static final List<String> DEFAULT_ICON_PAGES = Collections.unmodifiableList(Arrays.asList(
HOME,
ACCOUNTS,
ADDONS,
CONFIG,
DOWNLOADS,
- FIREFOX,
- HEALTHREPORT
+ FIREFOX
));
public static boolean isBuiltinIconPage(final String url) {
if (url == null ||
!url.startsWith("about:")) {
return false;
}
--- a/mobile/android/base/java/org/mozilla/gecko/preferences/GeckoPreferences.java
+++ b/mobile/android/base/java/org/mozilla/gecko/preferences/GeckoPreferences.java
@@ -124,17 +124,16 @@ public class GeckoPreferences
private static final String PREFS_TELEMETRY_ENABLED = "toolkit.telemetry.enabled";
private static final String PREFS_CRASHREPORTER_ENABLED = "datareporting.crashreporter.submitEnabled";
private static final String PREFS_MENU_CHAR_ENCODING = "browser.menu.showCharacterEncoding";
private static final String PREFS_MP_ENABLED = "privacy.masterpassword.enabled";
private static final String PREFS_UPDATER_AUTODOWNLOAD = "app.update.autodownload";
private static final String PREFS_UPDATER_URL = "app.update.url.android";
private static final String PREFS_GEO_REPORTING = NON_PREF_PREFIX + "app.geo.reportdata";
private static final String PREFS_GEO_LEARN_MORE = NON_PREF_PREFIX + "geo.learn_more";
- private static final String PREFS_HEALTHREPORT_LINK = NON_PREF_PREFIX + "healthreport.link";
public static final String PREFS_DEVTOOLS_REMOTE_USB_ENABLED = "devtools.remote.usb.enabled";
public static final String PREFS_DEVTOOLS_REMOTE_WIFI_ENABLED = "devtools.remote.wifi.enabled";
private static final String PREFS_DEVTOOLS_REMOTE_LINK = NON_PREF_PREFIX + "remote_debugging.link";
public static final String PREFS_VOICE_INPUT_ENABLED = NON_PREF_PREFIX + "voice_input_enabled";
public static final String PREFS_QRCODE_ENABLED = NON_PREF_PREFIX + "qrcode_enabled";
private static final String PREFS_TRACKING_PROTECTION_LEARN_MORE = NON_PREF_PREFIX + "trackingprotection.learn_more";
private static final String PREFS_CLEAR_PRIVATE_DATA = NON_PREF_PREFIX + "privacy.clear";
private static final String PREFS_CLEAR_PRIVATE_DATA_EXIT = NON_PREF_PREFIX + "history.clear_on_exit";
@@ -670,18 +669,17 @@ public class GeckoPreferences
continue;
}
} else if (PREFS_TELEMETRY_ENABLED.equals(key)) {
if (!AppConstants.MOZ_TELEMETRY_REPORTING || !Restrictions.isAllowed(this, Restrictable.DATA_CHOICES)) {
preferences.removePreference(pref);
i--;
continue;
}
- } else if (PREFS_HEALTHREPORT_UPLOAD_ENABLED.equals(key) ||
- PREFS_HEALTHREPORT_LINK.equals(key)) {
+ } else if (PREFS_HEALTHREPORT_UPLOAD_ENABLED.equals(key)) {
if (!AppConstants.MOZ_SERVICES_HEALTHREPORT || !Restrictions.isAllowed(this, Restrictable.DATA_CHOICES)) {
preferences.removePreference(pref);
i--;
continue;
}
} else if (PREFS_CRASHREPORTER_ENABLED.equals(key)) {
if (!AppConstants.MOZ_CRASHREPORTER || !Restrictions.isAllowed(this, Restrictable.DATA_CHOICES)) {
preferences.removePreference(pref);
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -417,17 +417,16 @@
<!-- Localization note (datareporting_fhr_title, datareporting_fhr_summary2,
reporting_telemetry_title, datareporting_telemetry_summary,
datareporting_crashreporter_summary) : These match the strings in
en-US/chrome/browser/preferences/advanced.dtd (healthReportSection.label,
healthReportDesc.label, telemetrySection.label, telemetryDesc.label,
crashReporterDesc.label). -->
<!ENTITY datareporting_fhr_title "&brandShortName; Health Report">
<!ENTITY datareporting_fhr_summary2 "Shares data with &vendorShortName; about your browser health and helps you understand your browser performance">
-<!ENTITY datareporting_abouthr_title "View my Health Report">
<!ENTITY datareporting_telemetry_title "Telemetry">
<!ENTITY datareporting_telemetry_summary "Shares performance, usage, hardware and customization data about your browser with &vendorShortName; to help us make &brandShortName; better">
<!ENTITY datareporting_crashreporter_summary "&brandShortName; submits crash reports to help &vendorShortName; make your browser more stable and secure">
<!-- Localization note (datareporting_crashreporter_title_short) : This string matches
(crashReporterSection.label) in en-US/chrome/browser/preferences/advanced.dtd.-->
<!ENTITY datareporting_crashreporter_title_short "Crash Reporter">
<!ENTITY datareporting_wifi_title2 "&vendorShortName; Location Service">
<!ENTITY datareporting_wifi_geolocation_summary4 "Help &vendorShortName; map the world! Share the approximate Wi-Fi and cellular location of your device to improve our geolocation service.">
@@ -865,9 +864,9 @@ is simply hidden from the Activity Strea
<!-- LOCALIZATION NOTE (pwa_add_to_launcher_confirm): The plus sign here is part of UI design -->
<!ENTITY pwa_add_to_launcher_confirm "+ Add to Home Screen">
<!-- LOCALIZATION NOTE (pwa_add_to_launcher_badge2): Used as label in the page actions dropdown list,
displayed when there are more than 3 actions available for a page.
See also https://bug1409261.bmoattachments.org/attachment.cgi?id=8919897 -->
<!ENTITY pwa_add_to_launcher_badge2 "Add to Home Screen">
<!ENTITY pwa_continue_to_website "Continue to Website">
-<!ENTITY pwa_onboarding_sumo "You can easily add this website to your Home screen to have instant access and browse faster with an app-like experience.">
\ No newline at end of file
+<!ENTITY pwa_onboarding_sumo "You can easily add this website to your Home screen to have instant access and browse faster with an app-like experience.">
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -332,17 +332,16 @@
<string name="datareporting_notification_action">&datareporting_notification_action;</string>
<string name="datareporting_notification_summary">&datareporting_notification_summary;</string>
<string name="datareporting_notification_ticker_text">&datareporting_notification_ticker_text;</string>
<string name="datareporting_telemetry_title">&datareporting_telemetry_title;</string>
<string name="datareporting_telemetry_summary">&datareporting_telemetry_summary;</string>
<string name="datareporting_fhr_title">&datareporting_fhr_title;</string>
<string name="datareporting_fhr_summary2">&datareporting_fhr_summary2;</string>
- <string name="datareporting_abouthr_title">&datareporting_abouthr_title;</string>
<string name="datareporting_crashreporter_title_short">&datareporting_crashreporter_title_short;</string>
<string name="datareporting_crashreporter_summary">&datareporting_crashreporter_summary;</string>
<string name="datareporting_wifi_title">&datareporting_wifi_title2;</string>
<string name="datareporting_wifi_geolocation_summary">&datareporting_wifi_geolocation_summary4;</string>
<string name="search">&search;</string>
<string name="reload">&reload;</string>
<string name="forward">&forward;</string>
deleted file mode 100644
--- a/mobile/android/chrome/content/aboutHealthReport.js
+++ /dev/null
@@ -1,194 +0,0 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
-/* 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/. */
-
-"use strict";
-
-var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/SharedPreferences.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "EventDispatcher",
- "resource://gre/modules/Messaging.jsm");
-
-// Name of Android SharedPreference controlling whether to upload
-// health reports.
-const PREF_UPLOAD_ENABLED = "android.not_a_preference.healthreport.uploadEnabled";
-
-// Name of Gecko Pref specifying report content location.
-const PREF_REPORTURL = "datareporting.healthreport.about.reportUrl";
-
-// Monotonically increasing wrapper API version number.
-const WRAPPER_VERSION = 1;
-
-const EVENT_HEALTH_REQUEST = "HealthReport:Request";
-const EVENT_HEALTH_RESPONSE = "HealthReport:Response";
-
-// about:healthreport prefs are stored in Firefox's default Android
-// SharedPreferences.
-var sharedPrefs = SharedPreferences.forApp();
-
-var healthReportWrapper = {
- init: function() {
- let iframe = document.getElementById("remote-report");
- iframe.addEventListener("load", healthReportWrapper.initRemotePage);
- let report = this._getReportURI();
- iframe.src = report.spec;
- console.log("AboutHealthReport: loading content from " + report.spec);
-
- sharedPrefs.addObserver(PREF_UPLOAD_ENABLED, this);
- Services.obs.addObserver(this, EVENT_HEALTH_RESPONSE);
- },
-
- observe: function(subject, topic, data) {
- if (topic == PREF_UPLOAD_ENABLED) {
- this.updatePrefState();
- } else if (topic == EVENT_HEALTH_RESPONSE) {
- this.updatePayload(data);
- }
- },
-
- uninit: function() {
- sharedPrefs.removeObserver(PREF_UPLOAD_ENABLED, this);
- Services.obs.removeObserver(this, EVENT_HEALTH_RESPONSE);
- },
-
- _getReportURI: function() {
- let url = Services.urlFormatter.formatURLPref(PREF_REPORTURL);
- // This handles URLs that already have query parameters.
- let uri = Services.io.newURI(url).QueryInterface(Ci.nsIURL);
- uri.query += ((uri.query != "") ? "&v=" : "v=") + WRAPPER_VERSION;
- return uri;
- },
-
- onOptIn: function() {
- console.log("AboutHealthReport: page sent opt-in command.");
- sharedPrefs.setBoolPref(PREF_UPLOAD_ENABLED, true);
- this.updatePrefState();
- },
-
- onOptOut: function() {
- console.log("AboutHealthReport: page sent opt-out command.");
- sharedPrefs.setBoolPref(PREF_UPLOAD_ENABLED, false);
- this.updatePrefState();
- },
-
- updatePrefState: function() {
- console.log("AboutHealthReport: sending pref state to page.");
- try {
- let prefs = {
- enabled: sharedPrefs.getBoolPref(PREF_UPLOAD_ENABLED),
- };
- this.injectData("prefs", prefs);
- } catch (e) {
- this.reportFailure(this.ERROR_PREFS_FAILED);
- }
- },
-
- refreshPayload: function() {
- console.log("AboutHealthReport: page requested fresh payload.");
- EventDispatcher.instance.sendRequest({
- type: EVENT_HEALTH_REQUEST,
- });
- },
-
- updatePayload: function(data) {
- healthReportWrapper.injectData("payload", data);
- // Data is supposed to be a string, so the length should be
- // defined. Just in case, we do this after injecting the data.
- console.log("AboutHealthReport: sending payload to page " +
- "(" + typeof(data) + " of length " + data.length + ").");
- },
-
- injectData: function(type, content) {
- let report = this._getReportURI();
-
- // file: URIs can't be used for targetOrigin, so we use "*" for
- // this special case. In all other cases, pass in the URL to the
- // report so we properly restrict the message dispatch.
- let reportUrl = (report.scheme == "file") ? "*" : report.spec;
-
- let data = {
- type: type,
- content: content,
- };
-
- let iframe = document.getElementById("remote-report");
- iframe.contentWindow.postMessage(data, reportUrl);
- },
-
- showSettings: function() {
- console.log("AboutHealthReport: showing settings.");
- EventDispatcher.instance.sendRequest({
- type: "Settings:Show",
- resource: "preferences_privacy",
- });
- },
-
- launchUpdater: function() {
- console.log("AboutHealthReport: launching updater.");
- EventDispatcher.instance.sendRequest({
- type: "Updater:Launch",
- });
- },
-
- handleRemoteCommand: function(evt) {
- switch (evt.detail.command) {
- case "DisableDataSubmission":
- this.onOptOut();
- break;
- case "EnableDataSubmission":
- this.onOptIn();
- break;
- case "RequestCurrentPrefs":
- this.updatePrefState();
- break;
- case "RequestCurrentPayload":
- this.refreshPayload();
- break;
- case "ShowSettings":
- this.showSettings();
- break;
- case "LaunchUpdater":
- this.launchUpdater();
- break;
- default:
- Cu.reportError("Unexpected remote command received: " + evt.detail.command +
- ". Ignoring command.");
- break;
- }
- },
-
- initRemotePage: function() {
- let iframe = document.getElementById("remote-report").contentDocument;
- iframe.addEventListener("RemoteHealthReportCommand",
- function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); });
- healthReportWrapper.injectData("begin", null);
- },
-
- // error handling
- ERROR_INIT_FAILED: 1,
- ERROR_PAYLOAD_FAILED: 2,
- ERROR_PREFS_FAILED: 3,
-
- reportFailure: function(error) {
- let details = {
- errorType: error,
- };
- healthReportWrapper.injectData("error", details);
- },
-
- handleInitFailure: function() {
- healthReportWrapper.reportFailure(healthReportWrapper.ERROR_INIT_FAILED);
- },
-
- handlePayloadFailure: function() {
- healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PAYLOAD_FAILED);
- },
-};
-
-window.addEventListener("load", healthReportWrapper.init.bind(healthReportWrapper));
-window.addEventListener("unload", healthReportWrapper.uninit.bind(healthReportWrapper));
deleted file mode 100644
--- a/mobile/android/chrome/content/aboutHealthReport.xhtml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [
-<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
-%brandDTD;
-<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
-%globalDTD;
-<!ENTITY % aboutHealthReportDTD SYSTEM "chrome://browser/locale/aboutHealthReport.dtd" >
-%aboutHealthReportDTD;
-]>
-
-<!-- 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/. -->
-
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <title>&abouthealth.pagetitle;</title>
- <link rel="icon" type="image/png" sizes="64x64"
- href="chrome://branding/content/favicon64.png" />
- <link rel="stylesheet"
- href="chrome://browser/skin/aboutHealthReport.css"
- type="text/css" />
- <script type="text/javascript"
- src="chrome://browser/content/aboutHealthReport.js" />
- </head>
- <body>
- <iframe id="remote-report"/>
- </body>
-</html>
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -5528,17 +5528,17 @@ var IdentityHandler = {
if (aState & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL) {
return this.IDENTITY_MODE_VERIFIED;
}
if (aState & Ci.nsIWebProgressListener.STATE_IS_SECURE) {
return this.IDENTITY_MODE_IDENTIFIED;
}
- let whitelist = /^about:(about|accounts|addons|buildconfig|cache|config|crashes|devices|downloads|fennec|firefox|feedback|healthreport|home|license|logins|logo|memory|mozilla|networking|privatebrowsing|rights|serviceworkers|support|telemetry|webrtc)($|\?)/i;
+ let whitelist = /^about:(about|accounts|addons|buildconfig|cache|config|crashes|devices|downloads|fennec|firefox|feedback|home|license|logins|logo|memory|mozilla|networking|privatebrowsing|rights|serviceworkers|support|telemetry|webrtc)($|\?)/i;
if (uri.schemeIs("about") && whitelist.test(uri.spec)) {
return this.IDENTITY_MODE_CHROMEUI;
}
return this.IDENTITY_MODE_UNKNOWN;
},
getMixedDisplayMode: function getMixedDisplayMode(aState) {
deleted file mode 100644
--- a/mobile/android/chrome/content/healthreport-prefs.js
+++ /dev/null
@@ -1,6 +0,0 @@
-#filter substitution
-/* 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/. */
-
-pref("datareporting.healthreport.about.reportUrl", "https://fhr.cdn.mozilla.net/%LOCALE%/mobile/");
--- a/mobile/android/chrome/jar.mn
+++ b/mobile/android/chrome/jar.mn
@@ -38,20 +38,16 @@ chrome.jar:
content/MasterPassword.js (content/MasterPassword.js)
content/FindHelper.js (content/FindHelper.js)
content/PermissionsHelper.js (content/PermissionsHelper.js)
content/FeedHandler.js (content/FeedHandler.js)
content/Feedback.js (content/Feedback.js)
content/Linkify.js (content/Linkify.js)
content/CastingApps.js (content/CastingApps.js)
content/RemoteDebugger.js (content/RemoteDebugger.js)
-#ifdef MOZ_SERVICES_HEALTHREPORT
- content/aboutHealthReport.xhtml (content/aboutHealthReport.xhtml)
- content/aboutHealthReport.js (content/aboutHealthReport.js)
-#endif
content/aboutAccounts.xhtml (content/aboutAccounts.xhtml)
content/aboutAccounts.js (content/aboutAccounts.js)
content/aboutLogins.xhtml (content/aboutLogins.xhtml)
content/aboutLogins.js (content/aboutLogins.js)
#ifndef RELEASE_OR_BETA
content/WebcompatReporter.js (content/WebcompatReporter.js)
#endif
content/ExtensionPermissions.js (content/ExtensionPermissions.js)
--- a/mobile/android/components/AboutRedirector.js
+++ b/mobile/android/components/AboutRedirector.js
@@ -67,23 +67,16 @@ var modules = {
privileged: true
},
accounts: {
uri: "chrome://browser/content/aboutAccounts.xhtml",
privileged: true
},
};
-if (AppConstants.MOZ_SERVICES_HEALTHREPORT) {
- modules.healthreport = {
- uri: "chrome://browser/content/aboutHealthReport.xhtml",
- privileged: true
- };
-}
-
function AboutRedirector() {}
AboutRedirector.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
classID: Components.ID("{322ba47e-7047-4f71-aebf-cb7d69325cd9}"),
_getModuleInfo: function(aURI) {
let moduleName = aURI.pathQueryRef.replace(/[?#].*/, "").toLowerCase();
return modules[moduleName];
--- a/mobile/android/components/MobileComponents.manifest
+++ b/mobile/android/components/MobileComponents.manifest
@@ -6,19 +6,16 @@ contract @mozilla.org/network/protocol/a
contract @mozilla.org/network/protocol/about;1?what=empty {322ba47e-7047-4f71-aebf-cb7d69325cd9}
contract @mozilla.org/network/protocol/about;1?what=rights {322ba47e-7047-4f71-aebf-cb7d69325cd9}
contract @mozilla.org/network/protocol/about;1?what=certerror {322ba47e-7047-4f71-aebf-cb7d69325cd9}
contract @mozilla.org/network/protocol/about;1?what=home {322ba47e-7047-4f71-aebf-cb7d69325cd9}
contract @mozilla.org/network/protocol/about;1?what=downloads {322ba47e-7047-4f71-aebf-cb7d69325cd9}
contract @mozilla.org/network/protocol/about;1?what=reader {322ba47e-7047-4f71-aebf-cb7d69325cd9}
contract @mozilla.org/network/protocol/about;1?what=feedback {322ba47e-7047-4f71-aebf-cb7d69325cd9}
contract @mozilla.org/network/protocol/about;1?what=privatebrowsing {322ba47e-7047-4f71-aebf-cb7d69325cd9}
-#ifdef MOZ_SERVICES_HEALTHREPORT
-contract @mozilla.org/network/protocol/about;1?what=healthreport {322ba47e-7047-4f71-aebf-cb7d69325cd9}
-#endif
contract @mozilla.org/network/protocol/about;1?what=blocked {322ba47e-7047-4f71-aebf-cb7d69325cd9}
contract @mozilla.org/network/protocol/about;1?what=accounts {322ba47e-7047-4f71-aebf-cb7d69325cd9}
contract @mozilla.org/network/protocol/about;1?what=logins {322ba47e-7047-4f71-aebf-cb7d69325cd9}
# DirectoryProvider.js
component {ef0f7a87-c1ee-45a8-8d67-26f586e46a4b} DirectoryProvider.js
contract @mozilla.org/browser/directory-provider;1 {ef0f7a87-c1ee-45a8-8d67-26f586e46a4b}
category xpcom-directory-providers browser-directory-provider @mozilla.org/browser/directory-provider;1
deleted file mode 100644
--- a/mobile/android/locales/en-US/chrome/aboutHealthReport.dtd
+++ /dev/null
@@ -1,6 +0,0 @@
-<!-- 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/. -->
-
-<!-- LOCALIZATION NOTE (abouthealth.pagetitle): Firefox Health Report is a proper noun in en-US, please keep this in mind. -->
-<!ENTITY abouthealth.pagetitle "&brandShortName; Health Report">
--- a/mobile/android/locales/jar.mn
+++ b/mobile/android/locales/jar.mn
@@ -14,19 +14,16 @@
locale/@AB_CD@/browser/aboutAddons.dtd (%chrome/aboutAddons.dtd)
locale/@AB_CD@/browser/aboutAddons.properties (%chrome/aboutAddons.properties)
locale/@AB_CD@/browser/aboutCertError.dtd (%chrome/aboutCertError.dtd)
locale/@AB_CD@/browser/aboutDownloads.dtd (%chrome/aboutDownloads.dtd)
locale/@AB_CD@/browser/aboutDownloads.properties (%chrome/aboutDownloads.properties)
locale/@AB_CD@/browser/aboutHome.dtd (%chrome/aboutHome.dtd)
locale/@AB_CD@/browser/aboutHome.properties (%chrome/aboutHome.properties)
locale/@AB_CD@/browser/aboutPrivateBrowsing.dtd (%chrome/aboutPrivateBrowsing.dtd)
-#ifdef MOZ_SERVICES_HEALTHREPORT
- locale/@AB_CD@/browser/aboutHealthReport.dtd (%chrome/aboutHealthReport.dtd)
-#endif
locale/@AB_CD@/browser/browser.properties (%chrome/browser.properties)
locale/@AB_CD@/browser/config.dtd (%chrome/config.dtd)
locale/@AB_CD@/browser/config.properties (%chrome/config.properties)
locale/@AB_CD@/browser/devicePrompt.properties (%chrome/devicePrompt.properties)
locale/@AB_CD@/browser/pippki.properties (%chrome/pippki.properties)
locale/@AB_CD@/browser/sync.properties (%chrome/sync.properties)
locale/@AB_CD@/browser/phishing.dtd (%chrome/phishing.dtd)
locale/@AB_CD@/browser/aboutLogins.dtd (%chrome/aboutLogins.dtd)
deleted file mode 100644
--- a/mobile/android/themes/core/aboutHealthReport.css
+++ /dev/null
@@ -1,15 +0,0 @@
-* {
- margin: 0;
- padding: 0;
-}
-
-html, body {
- height: 100%;
-}
-
-#remote-report {
- width: 100%;
- height: 100%;
- border: 0;
- display: flex;
-}
--- a/mobile/android/themes/core/jar.mn
+++ b/mobile/android/themes/core/jar.mn
@@ -7,19 +7,16 @@
chrome.jar:
% skin browser classic/1.0 %skin/
skin/aboutPage.css (aboutPage.css)
skin/about.css (about.css)
skin/aboutAccounts.css (aboutAccounts.css)
skin/aboutAddons.css (aboutAddons.css)
skin/aboutBase.css (aboutBase.css)
skin/aboutDownloads.css (aboutDownloads.css)
-#ifdef MOZ_SERVICES_HEALTHREPORT
- skin/aboutHealthReport.css (aboutHealthReport.css)
-#endif
skin/aboutMemory.css (aboutMemory.css)
skin/aboutPrivateBrowsing.css (aboutPrivateBrowsing.css)
skin/aboutReader.css (aboutReader.css)
skin/aboutReaderContent.css (aboutReaderContent.css)
skin/aboutReaderControls.css (aboutReaderControls.css)
skin/aboutSupport.css (aboutSupport.css)
skin/config.css (config.css)
skin/defines.css (defines.css)
--- a/modules/libpref/greprefs.js
+++ b/modules/libpref/greprefs.js
@@ -1,12 +1,10 @@
#include ../../security/manager/ssl/security-prefs.js
#include init/all.js
#ifdef MOZ_DATA_REPORTING
#include ../../toolkit/components/telemetry/datareporting-prefs.js
#endif
#ifdef MOZ_SERVICES_HEALTHREPORT
-#if MOZ_WIDGET_TOOLKIT == android
-#include ../../mobile/android/chrome/content/healthreport-prefs.js
-#else
+#if MOZ_WIDGET_TOOLKIT != android
#include ../../toolkit/components/telemetry/healthreport-prefs.js
#endif
#endif
--- a/testing/geckodriver/src/prefs.rs
+++ b/testing/geckodriver/src/prefs.rs
@@ -1,12 +1,12 @@
use mozprofile::preferences::Pref;
lazy_static! {
- pub static ref DEFAULT: [(&'static str, Pref); 81] = [
+ pub static ref DEFAULT: [(&'static str, Pref); 80] = [
// Disable automatic downloading of new releases
("app.update.auto", Pref::new(false)),
// Disable automatically upgrading Firefox
("app.update.enabled", Pref::new(false)),
// Increase the APZ content response timeout in tests to 1
// minute. This is to accommodate the fact that test environments
@@ -113,17 +113,16 @@ lazy_static! {
// tests that don't expect it to be there.
("browser.urlbar.userMadeSearchSuggestionsChoice", Pref::new(true)),
// Do not warn on quitting Firefox
("browser.warnOnQuit", Pref::new(false)),
// Do not show datareporting policy notifications which can
// interfere with tests
- ("datareporting.healthreport.about.reportUrl", Pref::new("http://%(server)s/dummy/abouthealthreport/")),
("datareporting.healthreport.documentServerURI", Pref::new("http://%(server)s/dummy/healthreport/")),
("datareporting.healthreport.logging.consoleEnabled", Pref::new(false)),
("datareporting.healthreport.service.enabled", Pref::new(false)),
("datareporting.healthreport.service.firstRun", Pref::new(false)),
("datareporting.healthreport.uploadEnabled", Pref::new(false)),
("datareporting.policy.dataSubmissionEnabled", Pref::new(false)),
("datareporting.policy.dataSubmissionPolicyAccepted", Pref::new(false)),
("datareporting.policy.dataSubmissionPolicyBypassNotification", Pref::new(true)),
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -22,17 +22,16 @@ class GeckoInstance(object):
# than production environments (with the b2g emulator being the slowest of them
# all), resulting in the production timeout value sometimes being exceeded
# and causing false-positive test failures. See bug 1176798, bug 1177018,
# bug 1210465.
"apz.content_response_timeout": 60000,
# Do not send Firefox health reports to the production server
"datareporting.healthreport.documentServerURI": "http://%(server)s/dummy/healthreport/",
- "datareporting.healthreport.about.reportUrl": "http://%(server)s/dummy/abouthealthreport/",
# Do not show datareporting policy notifications which can interfer with tests
"datareporting.policy.dataSubmissionPolicyBypassNotification": True,
"dom.ipc.reportProcessHangs": False,
# No slow script dialogs
"dom.max_chrome_script_run_time": 0,
--- a/testing/marionette/doc/api/server.js.html
+++ b/testing/marionette/doc/api/server.js.html
@@ -196,20 +196,16 @@ const RECOMMENDED_PREFS = new Map([
// Turn off the location bar search suggestions opt-in. It interferes with
// tests that don't expect it to be there.
["browser.urlbar.userMadeSearchSuggestionsChoice", true],
// Do not show datareporting policy notifications which can
// interfere with tests
[
- "datareporting.healthreport.about.reportUrl",
- "http://%(server)s/dummy/abouthealthreport/",
- ],
- [
"datareporting.healthreport.documentServerURI",
"http://%(server)s/dummy/healthreport/",
],
["datareporting.healthreport.logging.consoleEnabled", false],
["datareporting.healthreport.service.enabled", false],
["datareporting.healthreport.service.firstRun", false],
["datareporting.healthreport.uploadEnabled", false],
["datareporting.policy.dataSubmissionEnabled", false],
--- a/testing/marionette/server.js
+++ b/testing/marionette/server.js
@@ -170,20 +170,16 @@ const RECOMMENDED_PREFS = new Map([
// Turn off the location bar search suggestions opt-in. It interferes with
// tests that don't expect it to be there.
["browser.urlbar.userMadeSearchSuggestionsChoice", true],
// Do not show datareporting policy notifications which can
// interfere with tests
[
- "datareporting.healthreport.about.reportUrl",
- "http://%(server)s/dummy/abouthealthreport/",
- ],
- [
"datareporting.healthreport.documentServerURI",
"http://%(server)s/dummy/healthreport/",
],
["datareporting.healthreport.logging.consoleEnabled", false],
["datareporting.healthreport.service.enabled", false],
["datareporting.healthreport.service.firstRun", false],
["datareporting.healthreport.uploadEnabled", false],
["datareporting.policy.dataSubmissionEnabled", false],
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -165,17 +165,16 @@ user_pref("network.activity.blipInterval
// We do not wish to display datareporting policy notifications as it might
// cause other tests to fail. Tests that wish to test the notification functionality
// should explicitly disable this pref.
user_pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);
// Point Firefox Health Report at a local server. We don't care if it actually
// works. It just can't hit the default production endpoint.
user_pref("datareporting.healthreport.documentServerURI", "http://%(server)s/healthreport/");
-user_pref("datareporting.healthreport.about.reportUrl", "http://%(server)s/abouthealthreport/v4/");
// Make sure CSS error reporting is enabled for tests
user_pref("layout.css.report_errors", true);
// Enable CSS Grid 'subgrid' feature for testing
user_pref("layout.css.grid-template-subgrid-value.enabled", true);
// Enable CSS 'contain' for testing
--- a/testing/talos/talos/config.py
+++ b/testing/talos/talos/config.py
@@ -176,18 +176,16 @@ DEFAULTS = dict(
'media.capturestream_hints.enabled': True,
'browser.contentHandlers.types.0.uri': 'http://127.0.0.1/rss?url=%s',
'browser.contentHandlers.types.1.uri': 'http://127.0.0.1/rss?url=%s',
'browser.contentHandlers.types.2.uri': 'http://127.0.0.1/rss?url=%s',
'browser.contentHandlers.types.3.uri': 'http://127.0.0.1/rss?url=%s',
'browser.contentHandlers.types.4.uri': 'http://127.0.0.1/rss?url=%s',
'browser.contentHandlers.types.5.uri': 'http://127.0.0.1/rss?url=%s',
'identity.fxaccounts.auth.uri': 'https://127.0.0.1/fxa-dummy/',
- 'datareporting.healthreport.about.reportUrl':
- 'http://127.0.0.1/abouthealthreport/',
'datareporting.healthreport.documentServerURI':
'http://127.0.0.1/healthreport/',
'datareporting.policy.dataSubmissionPolicyBypassNotification': True,
'general.useragent.updates.enabled': False,
'browser.webapps.checkForUpdates': 0,
'browser.search.geoSpecificDefaults': False,
'browser.snippets.enabled': False,
'browser.snippets.syncPromo.enabled': False,
--- a/toolkit/components/telemetry/docs/internals/preferences.rst
+++ b/toolkit/components/telemetry/docs/internals/preferences.rst
@@ -23,20 +23,17 @@ mozconfig Defines
When Defined:
* Android: enables ``toolkit.telemetry.enabled``
``MOZ_SERVICES_HEALTHREPORT``
When Defined (which it is on most platforms):
- * Builds ``about:healthreport`` and associated underpinnings (see `healthreport <../fhr/index>`)
- * Desktop: includes ``toolkit/components/telemetry/healthreport-prefs.js`` (which sets ``datareporting.healthreport.{infoURL|uploadEnabled|about.reportUrl}``)
- * Android: enables ``datareporting.healthreport.uploadEnabled`` (which is unused on Android)
- * Android: includes ``mobile/android/chrome/content/healthreport-prefs.js`` (which sets ``datareporting.healthreport.about.reportUrl``)
+ * includes ``toolkit/components/telemetry/healthreport-prefs.js`` (which sets ``datareporting.healthreport.{infoURL|uploadEnabled}``)
``MOZ_DATA_REPORTING``
When Defined (which it is when ``MOZ_TELEMETRY_REPORTING``, ``MOZ_SERVICES_HEALTHREPORT``, or ``MOZ_CRASHREPORTER`` is defined (so, on most platforms, but not typically on developer builds)):
* Enables ``app.shield.optoutstudies.enabled``
When Not Defined:
--- a/toolkit/components/telemetry/healthreport-prefs.js
+++ b/toolkit/components/telemetry/healthreport-prefs.js
@@ -3,10 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global pref */
pref("datareporting.healthreport.infoURL", "https://www.mozilla.org/legal/privacy/firefox.html#health-report");
// Health Report is enabled by default on all channels.
pref("datareporting.healthreport.uploadEnabled", true);
-
-pref("datareporting.healthreport.about.reportUrl", "https://fhr.cdn.mozilla.net/%LOCALE%/v4/");