Skip to content

Commit

Permalink
Merge branch 'esr68' of github.com:mozilla/gecko-dev into current
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlex94 committed Feb 10, 2020
2 parents 62d3803 + ca883d2 commit 0307d49
Show file tree
Hide file tree
Showing 525 changed files with 7,967 additions and 5,441 deletions.
16 changes: 0 additions & 16 deletions .cron.yml
Expand Up @@ -82,22 +82,6 @@ jobs:
- mozilla-central
when: [] # never (hook only)

- name: nightly-android
job:
type: decision-task
treeherder-symbol: Na
target-tasks-method: nightly_fennec
include-push-tasks: true
android-release-type: nightly
run-on-projects:
- mozilla-esr68
when:
by-project:
# Fennec Nightly builds ship from ESR68
# Other branches ship only GeckoView
mozilla-esr68: [{hour: 10, minute: 0}]
# No default

- name: ship-geckoview
job:
type: decision-task
Expand Down
20 changes: 20 additions & 0 deletions .hgtags
Expand Up @@ -1967,3 +1967,23 @@ b9ced0dd1026bf43339ecd41b942d19f63ea72c6 FIREFOX_68_4_0esr_RELEASE
8b51bf38ddbb00131188d833c1441bb37128634b FIREFOX_68_4_1esr_RELEASE
386e0f597c08198ce1fe86398f28c0789eb73812 FENNEC_68_5b2_RELEASE
8b51bf38ddbb00131188d833c1441bb37128634b FENNEC_68_4_1_RELEASE
ba35b4e926ed8da2b7796272948d9d86cfec8f8d FENNEC_68_5b3_BUILD1
ba35b4e926ed8da2b7796272948d9d86cfec8f8d FENNEC_68_5b3_RELEASE
e215d711213984716b1c44db7d1254397de6ef4b FENNEC_68_4_2_BUILD1
e215d711213984716b1c44db7d1254397de6ef4b FIREFOX_68_4_2esr_BUILD1
e215d711213984716b1c44db7d1254397de6ef4b FENNEC_68_5b4_BUILD1
ffe5efb8f46e141281c46eed3fb81a452cb9055f FENNEC_68_5b4_BUILD2
e215d711213984716b1c44db7d1254397de6ef4b FENNEC_68_4_2_RELEASE
e215d711213984716b1c44db7d1254397de6ef4b FIREFOX_68_4_2esr_RELEASE
ffe5efb8f46e141281c46eed3fb81a452cb9055f FENNEC_68_5b4_RELEASE
d8e217ff942c17a15075e6cd4ec0f33b095f45fd FENNEC_68_5b5_BUILD1
d8e217ff942c17a15075e6cd4ec0f33b095f45fd FENNEC_68_5b5_RELEASE
fac95027fda1540460a05a2f6b05210a14e60293 FENNEC_68_5b6_BUILD1
fac95027fda1540460a05a2f6b05210a14e60293 FENNEC_68_5b6_RELEASE
18251ad24c9a3b89c42d4098b64e71f54a1e4586 FIREFOX_68_5_0esr_BUILD1
18251ad24c9a3b89c42d4098b64e71f54a1e4586 FENNEC_68_5_0_BUILD1
18251ad24c9a3b89c42d4098b64e71f54a1e4586 FENNEC_68_5_0_RELEASE
ef373efc995d9350a676c4c231b344d173423e8a FENNEC_68_5_0_BUILD2
ef373efc995d9350a676c4c231b344d173423e8a FIREFOX_68_5_0esr_BUILD2
18251ad24c9a3b89c42d4098b64e71f54a1e4586 FENNEC_68_5_0_RELEASE
ef373efc995d9350a676c4c231b344d173423e8a FENNEC_68_5_0_RELEASE
Expand Up @@ -36,7 +36,12 @@
}
}

this.eventSeq = [ new invokerChecker(EVENT_REORDER, gRootAcc) ];
this.eventSeq = [
new invokerChecker(EVENT_REORDER, gRootAcc),
// We use a function here to get the target because gDialog isn't set
// yet, but it will be when the function is called.
new invokerChecker(EVENT_FOCUS, () => gDialog.document)
];

this.invoke = () => (gDialog = window.openDialog(aURL));

Expand Down
182 changes: 175 additions & 7 deletions browser/app/blocklist.xml

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions browser/base/content/browser-addons.js
Expand Up @@ -524,6 +524,16 @@ var gXPInstallObserver = {
[brandShortName]
);

if (Services.policies) {
let extensionSettings = Services.policies.getExtensionSettings("*");
if (
extensionSettings &&
"blocked_install_message" in extensionSettings
) {
messageString += " " + extensionSettings.blocked_install_message;
}
}

options.removeOnDismissal = true;
options.persistent = false;

Expand Down
4 changes: 4 additions & 0 deletions browser/base/content/browser.js
Expand Up @@ -2136,6 +2136,10 @@ var gBrowserInit = {

Services.obs.notifyObservers(window, "browser-delayed-startup-finished");
TelemetryTimestamps.add("delayedStartupFinished");

if (!Services.policies.isAllowed("hideShowMenuBar")) {
document.getElementById("toolbar-menubar").removeAttribute("toolbarname");
}
},

_setInitialFocus() {
Expand Down
15 changes: 0 additions & 15 deletions browser/base/content/popup-notifications.inc
Expand Up @@ -117,18 +117,3 @@
</vbox>
</popupnotificationfooter>
</popupnotification>

<popupnotification id="storage-access-notification" hidden="true">
<popupnotificationcontent class="storage-access-notification-content">
<xul:vbox flex="1">
<!-- These need to be on the same line to avoid creating
whitespace between them (whitespace is added in the
localization file, if necessary). -->
<xul:description class="storage-access-perm-text"><html:span
id="storage-access-perm-label"/><html:a id="storage-access-perm-learnmore"
onclick="openTrustedLinkIn(this.href, 'tab'); return false;"
class="text-link popup-notification-learnmore-link"/><html:span
id="storage-access-perm-endlabel"/></xul:description>
</xul:vbox>
</popupnotificationcontent>
</popupnotification>
89 changes: 60 additions & 29 deletions browser/components/enterprisepolicies/Policies.jsm
Expand Up @@ -262,30 +262,23 @@ var Policies = {
log.error(`Unable to add certificate - ${certfile.path}`);
}
}
let now = Date.now() / 1000;
if (cert) {
gCertDB.asyncVerifyCertAtTime(
cert,
0x0008 /* certificateUsageSSLCA */,
0,
null,
now,
(aPRErrorCode, aVerifiedChain, aHasEVPolicy) => {
if (aPRErrorCode == Cr.NS_OK) {
// Certificate is already installed.
return;
}
try {
gCertDB.addCert(certFile, "CT,CT,");
} catch (e) {
// It might be PEM instead of DER.
gCertDB.addCertFromBase64(
pemToBase64(certFile),
"CT,CT,"
);
}
}
);
if (
gCertDB.isCertTrusted(
cert,
Ci.nsIX509Cert.CA_CERT,
Ci.nsIX509CertDB.TRUSTED_SSL
)
) {
// Certificate is already installed.
return;
}
try {
gCertDB.addCert(certFile, "CT,CT,");
} catch (e) {
// It might be PEM instead of DER.
gCertDB.addCertFromBase64(pemToBase64(certFile), "CT,CT,");
}
}
};
reader.readAsBinaryString(file);
Expand Down Expand Up @@ -583,18 +576,53 @@ var Policies = {

DisplayMenuBar: {
onBeforeUIStartup(manager, param) {
let value = (!param).toString();
// This policy is meant to change the default behavior, not to force it.
// If this policy was alreay applied and the user chose to re-hide the
// menu bar, do not show it again.
runOncePerModification("displayMenuBar", value, () => {
let value;
if (
typeof param === "boolean" ||
param == "default-on" ||
param == "default-off"
) {
switch (param) {
case "default-on":
value = "false";
break;
case "default-off":
value = "true";
break;
default:
value = (!param).toString();
break;
}
// This policy is meant to change the default behavior, not to force it.
// If this policy was already applied and the user chose to re-hide the
// menu bar, do not show it again.
runOncePerModification("displayMenuBar", value, () => {
gXulStore.setValue(
BROWSER_DOCUMENT_URL,
"toolbar-menubar",
"autohide",
value
);
});
} else {
switch (param) {
case "always":
value = "false";
break;
case "never":
// Make sure Alt key doesn't show the menubar
setAndLockPref("ui.key.menuAccessKeyFocuses", false);
value = "true";
break;
}
gXulStore.setValue(
BROWSER_DOCUMENT_URL,
"toolbar-menubar",
"autohide",
value
);
});
manager.disallowFeature("hideShowMenuBar");
}
},
},

Expand Down Expand Up @@ -658,6 +686,9 @@ var Policies = {
param.Locked
);
}
if ("Exceptions" in param) {
addAllowDenyPermissions("trackingprotection", param.Exceptions);
}
},
},

Expand Down
Expand Up @@ -277,7 +277,8 @@
},

"DisplayMenuBar": {
"type": "boolean"
"type": ["boolean", "string"],
"enum": ["always", "never", "default-on", "default-off"]
},

"DNSOverHTTPS": {
Expand Down Expand Up @@ -329,6 +330,13 @@
},
"Fingerprinting": {
"type": "boolean"
},
"Exceptions": {
"type": "array",
"strict": false,
"items": {
"type": "origin"
}
}
}
},
Expand Down Expand Up @@ -837,6 +845,12 @@
},
"widget.content.gtk-theme-override": {
"type": "string"
},
"dom.xmldocument.load.enabled": {
"type": "boolean"
},
"dom.xmldocument.async.enabled": {
"type": "boolean"
}
}
},
Expand Down
Expand Up @@ -3,24 +3,82 @@

"use strict";

add_task(async function setup() {
add_task(async function test_menu_shown_boolean() {
await setupPolicyEngineWithJson({
policies: {
DisplayMenuBar: true,
},
});

// Since testing will apply the policy after the browser has already started,
// we will need to open a new window to actually see the menu bar
let newWin = await BrowserTestUtils.openNewBrowserWindow();
let menubar = newWin.document.getElementById("toolbar-menubar");
is(
menubar.getAttribute("autohide"),
"false",
"The menu bar should not be hidden"
);

await BrowserTestUtils.closeWindow(newWin);
});

add_task(async function test_menu_shown() {
add_task(async function test_menu_shown_string() {
await setupPolicyEngineWithJson({
policies: {
DisplayMenuBar: "default-on",
},
});

// Since testing will apply the policy after the browser has already started,
// we will need to open a new window to actually see the menu bar
let newWin = await BrowserTestUtils.openNewBrowserWindow();
let menuBar = newWin.document.getElementById("toolbar-menubar");
let menubar = newWin.document.getElementById("toolbar-menubar");
is(
menuBar.getAttribute("autohide"),
menubar.getAttribute("autohide"),
"false",
"The menu bar should not be hidden"
);

await BrowserTestUtils.closeWindow(newWin);
});

add_task(async function test_menubar_on() {
await setupPolicyEngineWithJson({
policies: {
DisplayMenuBar: "always",
},
});

let newWin = await BrowserTestUtils.openNewBrowserWindow();
let menubar = newWin.document.getElementById("toolbar-menubar");
is(
menubar.hasAttribute("inactive"),
false,
"Menu bar should not have inactive"
);
is(
menubar.hasAttribute("toolbarname"),
false,
"Menu bar should not have a toolbarname"
);
await BrowserTestUtils.closeWindow(newWin);
});

add_task(async function test_menubar_off() {
await setupPolicyEngineWithJson({
policies: {
DisplayMenuBar: "never",
},
});

let newWin = await BrowserTestUtils.openNewBrowserWindow();
let menubar = newWin.document.getElementById("toolbar-menubar");
is(menubar.hasAttribute("inactive"), true, "Menu bar should have inactive");
is(
menubar.hasAttribute("toolbarname"),
false,
"Menu bar should not have a toolbarname"
);
await BrowserTestUtils.closeWindow(newWin);
});
Expand Up @@ -65,6 +65,7 @@ add_task(async function test_install_source_blocked_installtrigger() {
ExtensionSettings: {
"*": {
install_sources: ["http://blocks.other.install.sources/*"],
blocked_install_message: "blocked_install_message",
},
},
},
Expand All @@ -81,7 +82,12 @@ add_task(async function test_install_source_blocked_installtrigger() {
await ContentTask.spawn(tab.linkedBrowser, {}, () => {
content.document.getElementById("policytest_installtrigger").click();
});
await popupPromise;
let popup = await popupPromise;
let description = popup.querySelector(".popup-notification-description");
ok(
description.textContent.endsWith("blocked_install_message"),
"Custom install message present"
);
BrowserTestUtils.removeTab(tab);
});

Expand Down
Expand Up @@ -210,3 +210,22 @@ add_task(async function test_change_permission() {
Ci.nsIPermissionManager.EXPIRE_SESSION
);
});

add_task(async function test_setup_trackingprotection() {
await setupPolicyEngineWithJson({
policies: {
EnableTrackingProtection: {
Exceptions: ["https://www.allow.com"],
},
},
});
equal(
Services.policies.status,
Ci.nsIEnterprisePolicies.ACTIVE,
"Engine is active"
);
});

add_task(async function test_trackingprotection() {
checkPermission("allow.com", "ALLOW", "trackingprotection");
});

0 comments on commit 0307d49

Please sign in to comment.