зеркало из https://github.com/mozilla/gecko-dev.git
Merge autoland to mozilla-central. a=merge
This commit is contained in:
Коммит
5b2d2863bd
|
@ -79,7 +79,7 @@
|
|||
<label class="content-blocking-label" data-l10n-id="content-blocking-social-media-trackers"/>
|
||||
</hbox>
|
||||
<hbox class="extra-information-label cross-site-cookies-option" hidden="true">
|
||||
<label class="content-blocking-label" data-l10n-id="content-blocking-cross-site-cookies-in-all-windows"/>
|
||||
<label class="content-blocking-label" data-l10n-id="content-blocking-cross-site-cookies-in-all-windows2"/>
|
||||
</hbox>
|
||||
<hbox class="extra-information-label third-party-tracking-cookies-option" hidden="true">
|
||||
<label class="content-blocking-label" data-l10n-id="content-blocking-cross-site-tracking-cookies"/>
|
||||
|
@ -168,7 +168,7 @@
|
|||
<label class="content-blocking-label" data-l10n-id="content-blocking-all-cross-site-cookies-private-windows"/>
|
||||
</hbox>
|
||||
<hbox class="extra-information-label cross-site-cookies-option" hidden="true">
|
||||
<label class="content-blocking-label" data-l10n-id="content-blocking-cross-site-cookies-in-all-windows"/>
|
||||
<label class="content-blocking-label" data-l10n-id="content-blocking-cross-site-cookies-in-all-windows2"/>
|
||||
</hbox>
|
||||
<hbox class="extra-information-label pb-trackers-option" hidden="true">
|
||||
<label class="content-blocking-label" data-l10n-id="content-blocking-private-windows"/>
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
category l10n-registry 5-browser resource://app/localization/{locale}/
|
||||
category l10n-registry 5-browser resource://app/localization/{locale}/ backgroundtask=0
|
||||
category l10n-registry 5-browser resource://app/localization/{locale}/ backgroundtask=1
|
||||
|
|
|
@ -1190,7 +1190,7 @@ content-blocking-etp-custom-desc = Choose which trackers and scripts to block.
|
|||
content-blocking-etp-blocking-desc = { -brand-short-name } blocks the following:
|
||||
|
||||
content-blocking-private-windows = Tracking content in Private Windows
|
||||
content-blocking-cross-site-cookies-in-all-windows = Cross-site cookies in all windows (includes tracking cookies)
|
||||
content-blocking-cross-site-cookies-in-all-windows2 = Cross-site cookies in all windows
|
||||
content-blocking-cross-site-tracking-cookies = Cross-site tracking cookies
|
||||
content-blocking-all-cross-site-cookies-private-windows = Cross-site cookies in Private Windows
|
||||
content-blocking-cross-site-tracking-cookies-plus-isolate = Cross-site tracking cookies, and isolate remaining cookies
|
||||
|
@ -1212,6 +1212,8 @@ content-blocking-etp-standard-tcp-rollout-checkbox =
|
|||
content-blocking-etp-standard-tcp-rollout-description = Total Cookie Protection contains cookies to the site you’re on, so trackers can’t use them to follow you between sites.
|
||||
content-blocking-etp-standard-tcp-rollout-learn-more = Learn more
|
||||
|
||||
content-blocking-etp-standard-tcp-title = Includes Total Cookie Protection, our most powerful privacy feature ever
|
||||
|
||||
content-blocking-warning-title = Heads up!
|
||||
content-blocking-and-isolating-etp-warning-description-2 = This setting may cause some websites to not display content or work correctly. If a site seems broken, you may want to turn off tracking protection for that site to load all content.
|
||||
content-blocking-warning-learn-how = Learn how
|
||||
|
|
|
@ -33,8 +33,7 @@ ChromeUtils.defineModuleGetter(
|
|||
|
||||
const PREF_SECURITY_DELAY = "security.notification_enable_delay";
|
||||
|
||||
// Stores the browser and actor that has the active popup, used by formfill
|
||||
let currentBrowserWeakRef = null;
|
||||
// Stores the actor that has the active popup, used by formfill
|
||||
let currentActor = null;
|
||||
|
||||
let autoCompleteListeners = new Set();
|
||||
|
@ -177,10 +176,6 @@ class AutoCompleteParent extends JSWindowActorParent {
|
|||
return currentActor;
|
||||
}
|
||||
|
||||
static getCurrentBrowser() {
|
||||
return currentBrowserWeakRef ? currentBrowserWeakRef.get() : null;
|
||||
}
|
||||
|
||||
static addPopupStateListener(listener) {
|
||||
autoCompleteListeners.add(listener);
|
||||
}
|
||||
|
@ -216,7 +211,6 @@ class AutoCompleteParent extends JSWindowActorParent {
|
|||
// large list, and then open on a small one.
|
||||
this.openedPopup.adjustHeight();
|
||||
this.openedPopup = null;
|
||||
currentBrowserWeakRef = null;
|
||||
currentActor = null;
|
||||
evt.target.removeEventListener("popuphidden", this);
|
||||
evt.target.removeEventListener("popupshowing", this);
|
||||
|
@ -247,7 +241,6 @@ class AutoCompleteParent extends JSWindowActorParent {
|
|||
|
||||
// Non-empty result styles
|
||||
let resultStyles = new Set(results.map(r => r.style).filter(r => !!r));
|
||||
currentBrowserWeakRef = Cu.getWeakReference(browser);
|
||||
currentActor = this;
|
||||
this.openedPopup = browser.autoCompletePopup;
|
||||
// the layout varies according to different result type
|
||||
|
@ -456,15 +449,6 @@ class AutoCompleteParent extends JSWindowActorParent {
|
|||
this.closePopup();
|
||||
break;
|
||||
}
|
||||
|
||||
case "FormAutoComplete:Disconnect": {
|
||||
// The controller stopped controlling the current input, so clear
|
||||
// any cached data. This is necessary cause otherwise we'd clear data
|
||||
// only when starting a new search, but the next input could not support
|
||||
// autocomplete and it would end up inheriting the existing data.
|
||||
AutoCompleteResultView.clearResults();
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Returning false to pacify ESLint, but this return value is
|
||||
// ignored by the messaging infrastructure.
|
||||
|
|
|
@ -65,6 +65,7 @@ TESTING_JS_MODULES.backgroundtasks += [
|
|||
"tests/BackgroundTask_crash.jsm",
|
||||
"tests/BackgroundTask_file_exists.jsm",
|
||||
"tests/BackgroundTask_jsdebugger.jsm",
|
||||
"tests/BackgroundTask_localization.jsm",
|
||||
"tests/BackgroundTask_policies.jsm",
|
||||
"tests/BackgroundTask_profile_is_slim.jsm",
|
||||
"tests/BackgroundTask_shouldnotprocessupdates.jsm",
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
|
||||
* 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/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["runBackgroundTask"];
|
||||
|
||||
const { EXIT_CODE } = ChromeUtils.import(
|
||||
"resource://gre/modules/BackgroundTasksManager.jsm"
|
||||
).BackgroundTasksManager;
|
||||
|
||||
/**
|
||||
* Return 0 (success) if in the given resource file, the given string
|
||||
* identifier has the given string value, 11 (failure) otherwise.
|
||||
*/
|
||||
async function runBackgroundTask(commandLine) {
|
||||
let resource = commandLine.getArgument(0);
|
||||
let id = commandLine.getArgument(1);
|
||||
let expected = commandLine.getArgument(2);
|
||||
|
||||
let l10n = new Localization([resource]);
|
||||
let value = await l10n.formatValue(id);
|
||||
|
||||
let exitCode = value == expected ? EXIT_CODE.SUCCESS : 11;
|
||||
|
||||
console.error(
|
||||
`runBackgroundTask: in resource '${resource}': for id '${id}', ` +
|
||||
`expected is '${expected}' and value is '${value}'; ` +
|
||||
`exiting with status ${exitCode}`
|
||||
);
|
||||
|
||||
return exitCode;
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
|
||||
* vim: sw=4 ts=4 sts=4 et
|
||||
* 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/. */
|
||||
|
||||
async function doOne(resource, id) {
|
||||
let l10n = new Localization([resource], true);
|
||||
let value = await l10n.formatValue(id);
|
||||
Assert.ok(value, `${id} from ${resource} is not null: ${value}`);
|
||||
|
||||
let exitCode = await do_backgroundtask("localization", {
|
||||
extraArgs: [resource, id, value],
|
||||
});
|
||||
Assert.equal(0, exitCode);
|
||||
}
|
||||
|
||||
add_task(async function test_localization() {
|
||||
// Verify that the `l10n-registry` category is processed and that localization
|
||||
// works as expected in background tasks. We can use any FTL resource and
|
||||
// string identifier here as long as the value is short and can be passed as a
|
||||
// command line argument safely (i.e., is ASCII).
|
||||
|
||||
// One from toolkit/.
|
||||
await doOne("toolkit/global/commonDialog.ftl", "common-dialog-title-system");
|
||||
// And one from browser/.
|
||||
await doOne("browser/pageInfo.ftl", "not-set-date");
|
||||
});
|
|
@ -12,6 +12,7 @@ support-files =
|
|||
[test_backgroundtask_deletes_profile.js]
|
||||
[test_backgroundtask_exitcodes.js]
|
||||
[test_backgroundtask_help.js]
|
||||
[test_backgroundtask_localization.js]
|
||||
[test_backgroundtask_locked_profile.js]
|
||||
[test_backgroundtask_policies.js]
|
||||
[test_backgroundtask_profile_is_slim.js]
|
||||
|
|
|
@ -47,7 +47,10 @@ skip-if = os == "android"
|
|||
[test_TelemetryClientID_reset.js]
|
||||
skip-if = os == "android" # Disabled as Android/GeckoView doesn't run TelemetryController
|
||||
[test_HealthPing.js]
|
||||
skip-if = (verify && (os == 'win')) || (os == 'android' && processor == 'x86_64')
|
||||
skip-if =
|
||||
(verify && (os == 'win'))
|
||||
(os == 'android' && processor == 'x86_64')
|
||||
win10_2004
|
||||
tags = addons
|
||||
[test_TelemetryController_idle.js]
|
||||
[test_TelemetryControllerShutdown.js]
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
category l10n-registry 0-toolkit resource://gre/localization/{locale}/
|
||||
category l10n-registry 0-toolkit resource://gre/localization/{locale}/ backgroundtask=0
|
||||
category l10n-registry 0-toolkit resource://gre/localization/{locale}/ backgroundtask=1
|
||||
|
|
|
@ -456,10 +456,12 @@ add_task(async function saveas_files() {
|
|||
let list = await Downloads.getList(Downloads.PUBLIC);
|
||||
let downloadFinishedPromise = promiseDownloadFinished(list);
|
||||
|
||||
await BrowserTestUtils.openNewForegroundTab(
|
||||
await BrowserTestUtils.openNewForegroundTab({
|
||||
gBrowser,
|
||||
expectedItems[idx].url
|
||||
);
|
||||
opening: expectedItems[idx].url,
|
||||
waitForLoad: false,
|
||||
waitForStateStop: true,
|
||||
});
|
||||
|
||||
let download = await downloadFinishedPromise;
|
||||
|
||||
|
@ -482,10 +484,12 @@ add_task(async function saveas_files() {
|
|||
continue;
|
||||
}
|
||||
|
||||
await BrowserTestUtils.openNewForegroundTab(
|
||||
await BrowserTestUtils.openNewForegroundTab({
|
||||
gBrowser,
|
||||
expectedItems[idx].url
|
||||
);
|
||||
opening: expectedItems[idx].url,
|
||||
waitForLoad: false,
|
||||
waitForStateStop: true,
|
||||
});
|
||||
}
|
||||
|
||||
let filename = await new Promise(resolve => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче