From a734b2da97c32c752cba9ee75708d776d27e1655 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Tue, 10 Sep 2024 19:03:18 +0000 Subject: [PATCH] Bug 1889417 - Fix minor Fluent bugs in various tests. r=fluent-reviewers,credential-management-reviewers,fxview-reviewers,places-reviewers,omc-reviewers,backup-reviewers,urlbar-reviewers,dimi,Standard8,nsharpley,mconley,flod,emcminn Issues revealed by adding a `MOZ_ASSERT(false)` in Fluent error reporting and trawling through the resulting logs. Differential Revision: https://phabricator.services.mozilla.com/D221421 --- .../tests/browser/browser_aboutwelcome_mobile_downloads.js | 4 +--- .../backup/tests/chrome/test_disable_backup_encryption.html | 2 ++ .../backup/tests/chrome/test_enable_backup_encryption.html | 2 ++ .../backup/tests/chrome/test_restore_from_backup.html | 2 ++ .../tests/chrome/test_turn_off_scheduled_backups.html | 2 ++ .../firefoxview/tests/chrome/test_card_container.html | 1 + .../firefoxview/tests/chrome/test_fxview_tab_list.html | 2 ++ .../browser/browser_acknowledgeFeedbackAndDismissal.js | 4 ++-- .../formautofill/test/browser/browser_editAddressDialog.js | 2 +- .../mochitest/chrome/file_first_focusable_in_scope.xhtml | 6 +++++- netwerk/test/unit/xpcshell.toml | 5 +++-- toolkit/components/places/tests/favicons/xpcshell.toml | 1 + .../content/tests/chrome/test_mozinputbox_dictionary.xhtml | 4 ++++ 13 files changed, 28 insertions(+), 9 deletions(-) diff --git a/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_mobile_downloads.js b/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_mobile_downloads.js index bb94d575fe74..6450c57555ae 100644 --- a/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_mobile_downloads.js +++ b/browser/components/aboutwelcome/tests/browser/browser_aboutwelcome_mobile_downloads.js @@ -11,9 +11,7 @@ const BASE_CONTENT = { alt_text: "Test alt", }, email: { - link_text: { - string_id: "spotlight-focus-promo-email-link", - }, + link_text: "Email yourself a link", }, marketplace_buttons: ["ios", "android"], }, diff --git a/browser/components/backup/tests/chrome/test_disable_backup_encryption.html b/browser/components/backup/tests/chrome/test_disable_backup_encryption.html index 184fed2e12b5..8bbed1a79ce3 100644 --- a/browser/components/backup/tests/chrome/test_disable_backup_encryption.html +++ b/browser/components/backup/tests/chrome/test_disable_backup_encryption.html @@ -9,6 +9,8 @@ src="chrome://browser/content/backup/disable-backup-encryption.mjs" type="module" > + + + + + + + + + diff --git a/browser/components/firefoxview/tests/chrome/test_fxview_tab_list.html b/browser/components/firefoxview/tests/chrome/test_fxview_tab_list.html index abea8725eeb1..d517b9bc2001 100644 --- a/browser/components/firefoxview/tests/chrome/test_fxview_tab_list.html +++ b/browser/components/firefoxview/tests/chrome/test_fxview_tab_list.html @@ -5,6 +5,8 @@ FxviewTabList Tests + + diff --git a/browser/components/urlbar/tests/browser/browser_acknowledgeFeedbackAndDismissal.js b/browser/components/urlbar/tests/browser/browser_acknowledgeFeedbackAndDismissal.js index 1a484332099a..0a3e3366772f 100644 --- a/browser/components/urlbar/tests/browser/browser_acknowledgeFeedbackAndDismissal.js +++ b/browser/components/urlbar/tests/browser/browser_acknowledgeFeedbackAndDismissal.js @@ -377,13 +377,13 @@ class TestProvider extends UrlbarTestUtils.TestProvider { { name: DISMISS_ONE_COMMAND, l10n: { - id: "firefox-suggest-weather-command-not-interested", + id: "firefox-suggest-command-not-interested", }, }, { name: DISMISS_ALL_COMMAND, l10n: { - id: "firefox-suggest-weather-command-not-interested", + id: "firefox-suggest-command-not-interested", }, }, ]; diff --git a/browser/extensions/formautofill/test/browser/browser_editAddressDialog.js b/browser/extensions/formautofill/test/browser/browser_editAddressDialog.js index 4eef67f36a3a..07e371334be0 100644 --- a/browser/extensions/formautofill/test/browser/browser_editAddressDialog.js +++ b/browser/extensions/formautofill/test/browser/browser_editAddressDialog.js @@ -440,7 +440,7 @@ add_task(async function test_countryAndStateFieldLabels() { for (let countryOption of doc.querySelector("#country").options) { // Clear L10N textContent to not leave leftovers between country tests for (const labelEl of doc.querySelectorAll(".label-text")) { - doc.l10n.setAttributes(labelEl, ""); + delete labelEl.dataset["l10n-id"]; labelEl.textContent = ""; } diff --git a/dom/tests/mochitest/chrome/file_first_focusable_in_scope.xhtml b/dom/tests/mochitest/chrome/file_first_focusable_in_scope.xhtml index 7d7cd2f5ee8b..ab90230eaa59 100644 --- a/dom/tests/mochitest/chrome/file_first_focusable_in_scope.xhtml +++ b/dom/tests/mochitest/chrome/file_first_focusable_in_scope.xhtml @@ -2,8 +2,12 @@ + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + xmlns:html="http://www.w3.org/1999/xhtml"> + + +