Bug 1453480 - Update Preferences to use fluent-dom 0.2.0 API. r?stas
MozReview-Commit-ID: 4CFnjf9VFLz
--- a/browser/components/preferences/in-content/findInPage.js
+++ b/browser/components/preferences/in-content/findInPage.js
@@ -478,17 +478,17 @@ var gSearchResultsPane = {
// building a string of concatenated translated strings out of it.
let keywords = messages.map((msg, i) => {
let [refId, refAttr] = refs[i];
if (!msg) {
console.error(`Missing search l10n id "${refId}"`);
return null;
}
if (refAttr) {
- let attr = msg.attrs.find(a => a.name === refAttr);
+ let attr = msg.attributes && msg.attributes.find(a => a.name === refAttr);
if (!attr) {
console.error(`Missing search l10n id "${refId}.${refAttr}"`);
return null;
}
if (attr.value === "") {
console.error(`Empty value added to search-l10n-ids "${refId}.${refAttr}"`);
}
return attr.value;
--- a/browser/components/preferences/in-content/tests/browser_fluent.js
+++ b/browser/components/preferences/in-content/tests/browser_fluent.js
@@ -34,15 +34,15 @@ add_task(async function() {
["performance-default-content-process-count", { num: defaultProcessCount }]
]);
let elem = doc.querySelector(
`#contentProcessCount > menupopup > menuitem[value="${defaultProcessCount}"]`);
Assert.deepEqual(msg, {
value: null,
- attrs: [
+ attributes: [
{name: "label", value: elem.getAttribute("label")}
]
});
BrowserTestUtils.removeTab(gBrowser.selectedTab);
});