Commit 42c4a875 authored by Carsten Schoenert's avatar Carsten Schoenert
Browse files

New upstream version 78.11.0

parent 69552d82
......@@ -205,8 +205,8 @@ jobs:
- mozilla-release
- mozilla-esr78
when:
- {weekday: 'Monday', hour: 10, minute: 0}
- {weekday: 'Thursday', hour: 10, minute: 0}
- {weekday: 'Monday', hour: 8, minute: 0}
- {weekday: 'Thursday', hour: 8, minute: 0}
- name: python-dependency-update
job:
......
......@@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Merge day clobber
\ No newline at end of file
Bug 1705372 - Search Engine Webextensions removing locales need clobber (see bug 1707968)
......@@ -868,7 +868,6 @@ export default class LoginItem extends HTMLElement {
window.AboutLoginsUtils.passwordRevealVisible === false
) {
this._revealCheckbox.hidden = true;
return;
}
let { checked } = this._revealCheckbox;
......
......@@ -43,12 +43,6 @@
font-weight: normal;
}
#login-sort:-moz-focusring { /* This is a workaround due to Bug 1580935 */
color: transparent !important;
fill: var(--in-content-text-color);
text-shadow: 0 0 0 var(--in-content-text-color);
}
.count {
flex-grow: 1;
text-align: end;
......
......@@ -86,6 +86,17 @@ var Policies = {
},
},
AllowedDomainsForApps: {
onBeforeAddons(manager, param) {
Services.obs.addObserver(function(subject, topic, data) {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
if (channel.URI.host.endsWith(".google.com")) {
channel.setRequestHeader("X-GoogApps-Allowed-Domains", param, true);
}
}, "http-on-modify-request");
},
},
AppAutoUpdate: {
onBeforeUIStartup(manager, param) {
// Logic feels a bit reversed here, but it's correct. If AppAutoUpdate is
......@@ -1452,7 +1463,9 @@ var Policies = {
"general.autoScroll",
"general.smoothScroll",
"geo.",
"gfx.",
"intl.",
"layers.",
"layout.",
"media.",
"network.",
......
......@@ -18,13 +18,13 @@
</head>
<body id="body">
<div id="categories">
<div class="category" selected="true" id="category-active">
<div class="category" selected="true" id="category-active" tabindex="0">
<label class="category-name" data-l10n-id="active-policies-tab"></label>
</div>
<div class="category" id="category-documentation">
<div class="category" id="category-documentation" tabindex="0">
<label class="category-name" data-l10n-id="documentation-tab"></label>
</div>
<div class="category" id="category-errors">
<div class="category" id="category-errors" tabindex="0">
<label class="category-name" data-l10n-id="errors-tab"></label>
</div>
</div>
......
......@@ -365,6 +365,11 @@ window.onload = function() {
let menu = document.getElementById("categories");
for (let category of menu.children) {
category.addEventListener("click", () => show(category));
category.addEventListener("keypress", function(event) {
if (event.keyCode == KeyEvent.DOM_VK_RETURN) {
show(category);
}
});
}
if (location.hash) {
......
......@@ -17,6 +17,10 @@
}
},
"AllowedDomainsForApps": {
"type": "string"
},
"AppAutoUpdate": {
"type": "boolean"
},
......@@ -477,6 +481,9 @@
},
"blocked_install_message": {
"type": "string"
},
"updates_disabled": {
"type": "boolean"
}
}
}
......
......@@ -30,6 +30,7 @@ reason = Plugins are not supported on Windows/AArch64
[browser_policy_disable_fxaccounts.js]
skip-if = (verify && debug && (os == 'mac'))
[browser_policy_disable_masterpassword.js]
[browser_policy_disable_password_reveal.js]
[browser_policy_disable_pocket.js]
[browser_policy_disable_popup_blocker.js]
[browser_policy_disable_privatebrowsing.js]
......@@ -43,6 +44,7 @@ skip-if = (verify && debug && (os == 'mac'))
[browser_policy_extensions.js]
[browser_policy_downloads.js]
[browser_policy_extensionsettings.js]
[browser_policy_extensionsettings2.js]
[browser_policy_firefoxhome.js]
[browser_policy_handlers.js]
[browser_policy_masterpassword.js]
......
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function test_hidden_reveal_password() {
await setupPolicyEngineWithJson({
policies: {
DisablePasswordReveal: true,
},
});
let aboutLoginsTab = await BrowserTestUtils.openNewForegroundTab({
gBrowser,
url: "about:logins",
});
let browser = gBrowser.selectedBrowser;
await SpecialPowers.spawn(browser, [], () => {
let loginList = Cu.waiveXrays(content.document.querySelector("login-list"));
let createButton = loginList._createLoginButton;
ok(
!createButton.disabled,
"Create button should not be disabled initially"
);
let loginItem = Cu.waiveXrays(content.document.querySelector("login-item"));
createButton.click();
let passwordReveal = loginItem.shadowRoot.querySelector(
".reveal-password-checkbox"
);
is(passwordReveal.hidden, true, "Password reveal button should be hidden");
// Bug 1696948
let passwordInput = loginItem.shadowRoot.querySelector(
"input[name='password']"
);
isnot(passwordInput, null, "Password field should be in the DOM");
});
BrowserTestUtils.removeTab(aboutLoginsTab);
});
......@@ -19,7 +19,7 @@ async function isExtensionLocked(win, addonID) {
}
add_task(async function test_addon_install() {
let installPromise = wait_for_addon_install();
let installPromise = waitForAddonInstall(ADDON_ID);
await setupPolicyEngineWithJson({
policies: {
Extensions: {
......@@ -53,8 +53,8 @@ add_task(async function test_addon_reinstall() {
// Test that uninstalling and reinstalling the same addon ID works as expected.
// This can be used to update an addon.
let uninstallPromise = wait_for_addon_uninstall();
let installPromise = wait_for_addon_install();
let uninstallPromise = waitForAddonUninstall(ADDON_ID);
let installPromise = waitForAddonInstall(ADDON_ID);
await setupPolicyEngineWithJson({
policies: {
Extensions: {
......@@ -82,7 +82,7 @@ add_task(async function test_addon_reinstall() {
add_task(async function test_addon_uninstall() {
EnterprisePolicyTesting.resetRunOnceState();
let uninstallPromise = wait_for_addon_uninstall();
let uninstallPromise = waitForAddonUninstall(ADDON_ID);
await setupPolicyEngineWithJson({
policies: {
Extensions: {
......@@ -99,7 +99,7 @@ add_task(async function test_addon_download_failure() {
// Test that if the download fails, the runOnce pref
// is cleared so that the download will happen again.
let installPromise = wait_for_addon_install();
let installPromise = waitForAddonInstall(ADDON_ID);
await setupPolicyEngineWithJson({
policies: {
Extensions: {
......@@ -117,38 +117,3 @@ add_task(async function test_addon_download_failure() {
"runOnce pref should be unset"
);
});
function wait_for_addon_install() {
return new Promise(resolve => {
let listener = {
onInstallEnded(install, addon) {
if (addon.id == ADDON_ID) {
AddonManager.removeInstallListener(listener);
resolve();
}
},
onDownloadFailed() {
AddonManager.removeInstallListener(listener);
resolve();
},
onInstallFailed() {
AddonManager.removeInstallListener(listener);
resolve();
},
};
AddonManager.addInstallListener(listener);
});
}
function wait_for_addon_uninstall() {
return new Promise(resolve => {
let listener = {};
listener.onUninstalled = addon => {
if (addon.id == ADDON_ID) {
AddonManager.removeAddonListener(listener);
resolve();
}
};
AddonManager.addAddonListener(listener);
});
}
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const ADDON_ID = "policytest@mozilla.com";
const BASE_URL =
"http://mochi.test:8888/browser/browser/components/enterprisepolicies/tests/browser";
async function isExtensionLockedAndUpdateDisabled(win, addonID) {
let addonCard = await BrowserTestUtils.waitForCondition(async () => {
let doc = win.getHtmlBrowser().contentDocument;
await win.htmlBrowserLoaded;
return doc.querySelector(`addon-card[addon-id="${addonID}"]`);
}, `Get addon-card for "${addonID}"`);
let disableBtn = addonCard.querySelector('[action="toggle-disabled"]');
let removeBtn = addonCard.querySelector('panel-item[action="remove"]');
ok(removeBtn.disabled, "Remove button should be disabled");
ok(disableBtn.hidden, "Disable button should be hidden");
let updateRow = addonCard.querySelector(".addon-detail-row-updates");
is(updateRow.hidden, true, "Update row should be hidden");
}
add_task(async function test_addon_install() {
let installPromise = waitForAddonInstall(ADDON_ID);
await setupPolicyEngineWithJson({
policies: {
ExtensionSettings: {
"policytest@mozilla.com": {
install_url: `${BASE_URL}/policytest_v0.1.xpi`,
installation_mode: "force_installed",
updates_disabled: true,
},
},
},
});
await installPromise;
let addon = await AddonManager.getAddonByID(ADDON_ID);
isnot(addon, null, "Addon not installed.");
is(addon.version, "0.1", "Addon version is correct");
Assert.deepEqual(
addon.installTelemetryInfo,
{ source: "enterprise-policy" },
"Got the expected addon.installTelemetryInfo"
);
});
add_task(async function test_addon_locked_update_disabled() {
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
const win = await BrowserOpenAddonsMgr(
"addons://detail/" + encodeURIComponent(ADDON_ID)
);
await isExtensionLockedAndUpdateDisabled(win, ADDON_ID);
BrowserTestUtils.removeTab(tab);
});
add_task(async function test_addon_uninstall() {
let uninstallPromise = waitForAddonUninstall(ADDON_ID);
await setupPolicyEngineWithJson({
policies: {
ExtensionSettings: {
"policytest@mozilla.com": {
installation_mode: "blocked",
},
},
},
});
await uninstallPromise;
let addon = await AddonManager.getAddonByID(ADDON_ID);
is(addon, null, "Addon should be uninstalled.");
});
......@@ -192,3 +192,38 @@ registerCleanupFunction(async function policies_headjs_finishWithCleanSlate() {
EnterprisePolicyTesting.resetRunOnceState();
PoliciesPrefTracker.stop();
});
function waitForAddonInstall(addonId) {
return new Promise(resolve => {
let listener = {
onInstallEnded(install, addon) {
if (addon.id == addonId) {
AddonManager.removeInstallListener(listener);
resolve();
}
},
onDownloadFailed() {
AddonManager.removeInstallListener(listener);
resolve();
},
onInstallFailed() {
AddonManager.removeInstallListener(listener);
resolve();
},
};
AddonManager.addInstallListener(listener);
});
}
function waitForAddonUninstall(addonId) {
return new Promise(resolve => {
let listener = {};
listener.onUninstalled = addon => {
if (addon.id == addonId) {
AddonManager.removeAddonListener(listener);
resolve();
}
};
AddonManager.addAddonListener(listener);
});
}
......@@ -55,8 +55,8 @@ this.getSearchProvider = getSearchProvider;
// Check topsite against predefined list of valid search engines
// https://searchfox.org/mozilla-central/rev/ca869724246f4230b272ed1c8b9944596e80d920/toolkit/components/search/nsSearchService.js#939
async function checkHasSearchEngine(keyword) {
return (await Services.search.getDefaultEngines()).find(e =>
e.wrappedJSObject._internalAliases.includes(keyword)
return (await Services.search.getDefaultEngines()).find(
e => e.wrappedJSObject._internalAliases.includes(keyword) && !e.hidden
);
}
this.checkHasSearchEngine = checkHasSearchEngine;
......
......@@ -146,13 +146,14 @@ this.TopSitesFeed = class TopSitesFeed {
observe(subj, topic, data) {
// We should update the current top sites if the search engine has been changed since
// the search engine that gets filtered out of top sites has changed.
if (
topic === "browser-search-engine-modified" &&
data === "engine-default" &&
this.store.getState().Prefs.values[FILTER_DEFAULT_SEARCH_PREF]
) {
delete this._currentSearchHostname;
this._currentSearchHostname = getShortURLForCurrentSearch();
if (topic === "browser-search-engine-modified") {
if (
data === "engine-default" &&
this.store.getState().Prefs.values[FILTER_DEFAULT_SEARCH_PREF]
) {
delete this._currentSearchHostname;
this._currentSearchHostname = getShortURLForCurrentSearch();
}
this.refresh({ broadcast: true });
} else if (
topic === "nsPref:changed" &&
......@@ -362,6 +363,17 @@ this.TopSitesFeed = class TopSitesFeed {
return link;
}
// Drop pinned search shortcuts when their engine has been removed / hidden.
if (link.searchTopSite) {
const searchProvider = getSearchProvider(shortURL(link));
if (
!searchProvider ||
!(await checkHasSearchEngine(searchProvider.keyword))
) {
return null;
}
}
// Copy all properties from a frecent link and add more
const finder = other => other.url === link.url;
......
......@@ -14,4 +14,4 @@
"searchUrlGetParams": {
"message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended"
}
}
\ No newline at end of file
}
......@@ -12,6 +12,6 @@
"message": "https://www.amazon.ca/exec/obidos/external-search/?field-keywords={searchTerms}&ie={inputEncoding}&mode=blended"
},
"searchUrlGetParams": {
"message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended"
"message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=mozillacanada-20&sourceid=Mozilla-search"
}
}
\ No newline at end of file
}
{
"extensionName": {
"message": "Amazon.com.mx"
"message": "Amazon.es"
},
"extensionDescription": {
"message": "Amazon.com.mx Search"
"message": "Amazon.es"
},
"searchUrl": {
"message": "https://www.amazon.com.mx/exec/obidos/external-search/"
"message": "https://www.amazon.es/exec/obidos/external-search/"
},
"searchForm": {
"message": "https://www.amazon.com.mx/exec/obidos/external-search/?field-keywords={searchTerms}&ie={inputEncoding}&mode=blended"
"message": "https://www.amazon.es/"
},
"searchUrlGetParams": {
"message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended"
"message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=mozillaspain-21&sourceid=Mozilla-search"
},
"suggestUrl": {
"message": "https://completion.amazon.es/search/complete"
},
"suggestUrlGetParams": {
"message": "q={searchTerms}&search-alias=aps&mkt=44551"
}
}
\ No newline at end of file
}
{
"extensionName": {
"message": "Amazon.se"
},
"extensionDescription": {
"message": "Amazon.se"
},
"searchUrl": {
"message": "https://www.amazon.se/exec/obidos/external-search/"
},
"searchForm": {
"message": "https://www.amazon.se/"
},
"searchUrlGetParams": {
"message": "field-keywords={searchTerms}&ie={inputEncoding}&mode=blended&tag=mozillasweede-21&sourceid=Mozilla-search"
},
"suggestUrl": {
"message": "https://completion.amazon.se/search/complete"
},
"suggestUrlGetParams": {
"message": "q={searchTerms}&search-alias=aps&mkt=704403121"
}
}
......@@ -2,7 +2,7 @@
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"manifest_version": 2,
"version": "1.1",
"version": "1.3",
"applications": {
"gecko": {
"id": "amazon@search.mozilla.org"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment