зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 4c4e2ff81b8c (bug 1733839) for bc failures on browser_remote_l10n.js . CLOSED TREE
This commit is contained in:
Родитель
3437927335
Коммит
dd5cc477ca
|
@ -297,9 +297,7 @@ const MessageLoaderUtils = {
|
|||
if (record && record.data) {
|
||||
const downloader = new Downloader(
|
||||
RS_MAIN_BUCKET,
|
||||
RS_COLLECTION_L10N,
|
||||
"browser",
|
||||
"newtab"
|
||||
RS_COLLECTION_L10N
|
||||
);
|
||||
// Await here in order to capture the exceptions for reporting.
|
||||
await downloader.download(record.data, {
|
||||
|
|
|
@ -47,7 +47,6 @@ https_first_disabled = true
|
|||
[browser_newtab_trigger.js]
|
||||
[browser_open_tab_focus.js]
|
||||
skip-if = (os == "linux") # Test setup only implemented for OSX and Windows
|
||||
[browser_remote_l10n.js]
|
||||
[browser_topsites_contextMenu_options.js]
|
||||
[browser_topsites_section.js]
|
||||
[browser_asrouter_cfr.js]
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const { RemoteL10n } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/RemoteL10n.jsm"
|
||||
);
|
||||
|
||||
add_task(async function test_TODO() {
|
||||
const CONTENT = "remote_l10n_test_string = RemoteL10n string";
|
||||
const dirPath = OS.Path.join(
|
||||
OS.Constants.Path.localProfileDir,
|
||||
...["settings", "main", "ms-language-packs", "browser", "newtab"]
|
||||
);
|
||||
const filePath = OS.Path.join(dirPath, "asrouter.ftl");
|
||||
|
||||
await IOUtils.makeDirectory(dirPath, {
|
||||
ignoreExisting: true,
|
||||
from: OS.Constants.Path.localProfileDir,
|
||||
});
|
||||
await IOUtils.writeUTF8(filePath, CONTENT, {
|
||||
tmpPath: `${filePath}.tmp`,
|
||||
});
|
||||
|
||||
RemoteL10n.reloadL10n();
|
||||
|
||||
let [{ value }] = await RemoteL10n.l10n.formatMessages([
|
||||
{ id: "remote_l10n_test_string" },
|
||||
]);
|
||||
|
||||
Assert.equal(
|
||||
value,
|
||||
"RemoteL10n string",
|
||||
"Got back the string we wrote to disk"
|
||||
);
|
||||
});
|
|
@ -2743,24 +2743,6 @@ describe("ASRouter", () => {
|
|||
spy = sandbox.spy();
|
||||
global.Downloader.prototype.download = spy;
|
||||
});
|
||||
it("should be called with the expected dir path", async () => {
|
||||
const dlSpy = sandbox.spy(global, "Downloader");
|
||||
|
||||
sandbox
|
||||
.stub(global.Services.locale, "appLocaleAsBCP47")
|
||||
.get(() => "en-US");
|
||||
sandbox.stub(global.RemoteL10n, "isLocaleSupported").returns(true);
|
||||
|
||||
await MessageLoaderUtils._remoteSettingsLoader(provider, {});
|
||||
|
||||
assert.calledWith(
|
||||
dlSpy,
|
||||
"main",
|
||||
"ms-language-packs",
|
||||
"browser",
|
||||
"newtab"
|
||||
);
|
||||
});
|
||||
it("should allow fetch for known locales", async () => {
|
||||
sandbox
|
||||
.stub(global.Services.locale, "appLocaleAsBCP47")
|
||||
|
|
Загрузка…
Ссылка в новой задаче