summaryrefslogtreecommitdiffstats
path: root/toolkit/components/translations/tests/browser/shared-head.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/translations/tests/browser/shared-head.js')
-rw-r--r--toolkit/components/translations/tests/browser/shared-head.js30
1 files changed, 22 insertions, 8 deletions
diff --git a/toolkit/components/translations/tests/browser/shared-head.js b/toolkit/components/translations/tests/browser/shared-head.js
index afa060c8a3..021534c2e0 100644
--- a/toolkit/components/translations/tests/browser/shared-head.js
+++ b/toolkit/components/translations/tests/browser/shared-head.js
@@ -33,8 +33,8 @@ const SPANISH_PAGE_URL_DOT_ORG =
URL_ORG_PREFIX + DIR_PATH + "translations-tester-es.html";
const NO_LANGUAGE_URL =
URL_COM_PREFIX + DIR_PATH + "translations-tester-no-tag.html";
-const EMPTY_PDF_URL =
- URL_COM_PREFIX + DIR_PATH + "translations-tester-empty-pdf-file.pdf";
+const PDF_TEST_PAGE_URL =
+ URL_COM_PREFIX + DIR_PATH + "translations-tester-pdf-file.pdf";
const SELECT_TEST_PAGE_URL =
URL_COM_PREFIX + DIR_PATH + "translations-tester-select.html";
@@ -358,8 +358,9 @@ function getTranslationsParent() {
* @param {ChromeWindow} [win]
*/
async function closeAllOpenPanelsAndMenus(win) {
- await closeSettingsMenuIfOpen(win);
+ await closeFullPagePanelSettingsMenuIfOpen(win);
await closeFullPageTranslationsPanelIfOpen(win);
+ await closeSelectPanelSettingsMenuIfOpen(win);
await closeSelectTranslationsPanelIfOpen(win);
await closeContextMenuIfOpen(win);
}
@@ -400,11 +401,11 @@ async function closeContextMenuIfOpen(win) {
}
/**
- * Closes the translations panel settings menu if it is open.
+ * Closes the full-page translations panel settings menu if it is open.
*
* @param {ChromeWindow} [win]
*/
-async function closeSettingsMenuIfOpen(win) {
+async function closeFullPagePanelSettingsMenuIfOpen(win) {
await closePopupIfOpen(
"full-page-translations-panel-settings-menupopup",
win
@@ -412,6 +413,15 @@ async function closeSettingsMenuIfOpen(win) {
}
/**
+ * Closes the select translations panel settings menu if it is open.
+ *
+ * @param {ChromeWindow} [win]
+ */
+async function closeSelectPanelSettingsMenuIfOpen(win) {
+ await closePopupIfOpen("select-translations-panel-settings-menupopup", win);
+}
+
+/**
* Closes the translations panel if it is open.
*
* @param {ChromeWindow} [win]
@@ -543,6 +553,10 @@ async function loadTestPage({
["browser.translations.automaticallyPopup", true],
["browser.translations.alwaysTranslateLanguages", ""],
["browser.translations.neverTranslateLanguages", ""],
+ // Bug 1893100 - This is needed to ensure that switching focus
+ // with tab works in tests independent of macOS settings that
+ // would otherwise disable keyboard navigation at the OS level.
+ ["accessibility.tabfocus_applies_to_xul", false],
...(prefs ?? []),
],
});
@@ -956,21 +970,21 @@ async function selectAboutPreferencesElements() {
);
const frenchLabel = frenchRow.querySelector("label");
const frenchDownload = frenchRow.querySelector(
- `[data-l10n-id="translations-manage-language-install-button"]`
+ `[data-l10n-id="translations-manage-language-download-button"]`
);
const frenchDelete = frenchRow.querySelector(
`[data-l10n-id="translations-manage-language-remove-button"]`
);
const spanishLabel = spanishRow.querySelector("label");
const spanishDownload = spanishRow.querySelector(
- `[data-l10n-id="translations-manage-language-install-button"]`
+ `[data-l10n-id="translations-manage-language-download-button"]`
);
const spanishDelete = spanishRow.querySelector(
`[data-l10n-id="translations-manage-language-remove-button"]`
);
const ukrainianLabel = ukrainianRow.querySelector("label");
const ukrainianDownload = ukrainianRow.querySelector(
- `[data-l10n-id="translations-manage-language-install-button"]`
+ `[data-l10n-id="translations-manage-language-download-button"]`
);
const ukrainianDelete = ukrainianRow.querySelector(
`[data-l10n-id="translations-manage-language-remove-button"]`