summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/forms
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /browser/base/content/test/forms
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/base/content/test/forms')
-rw-r--r--browser/base/content/test/forms/browser.toml4
-rw-r--r--browser/base/content/test/forms/browser_selectpopup_minFontSize.js38
2 files changed, 41 insertions, 1 deletions
diff --git a/browser/base/content/test/forms/browser.toml b/browser/base/content/test/forms/browser.toml
index 33d73ba8bf..95b666369e 100644
--- a/browser/base/content/test/forms/browser.toml
+++ b/browser/base/content/test/forms/browser.toml
@@ -1,5 +1,5 @@
[DEFAULT]
-prefs = ["gfx.font_loader.delay=0", "dom.select.showPicker.enabled=true"]
+prefs = ["gfx.font_loader.delay=0", "dom.select.showPicker.enabled=true", "font.minimum-size.x-western=9"]
support-files = ["head.js"]
["browser_selectpopup.js"]
@@ -18,6 +18,8 @@ skip-if = ["os == 'linux'"] # Bug 1329991 - test fails intermittently on Linux b
["browser_selectpopup_large.js"]
+["browser_selectpopup_minFontSize.js"]
+
["browser_selectpopup_searchfocus.js"]
fail-if = ["a11y_checks"] # Bug 1854233 input may not be labeled
diff --git a/browser/base/content/test/forms/browser_selectpopup_minFontSize.js b/browser/base/content/test/forms/browser_selectpopup_minFontSize.js
new file mode 100644
index 0000000000..d240c2d2d0
--- /dev/null
+++ b/browser/base/content/test/forms/browser_selectpopup_minFontSize.js
@@ -0,0 +1,38 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+// NOTE that this test expects "font.minimum-size.x-western=9" to be set
+// in the manifest.
+
+const PAGE = `
+<!doctype html>
+<body lang="en-US">
+<select>
+ <option style="font-size:24px">A</option>
+ <option style="font-size:6px">BCD</option>
+</select>
+`;
+
+add_task(async function () {
+ const url = "data:text/html," + encodeURI(PAGE);
+ await BrowserTestUtils.withNewTab(
+ {
+ gBrowser,
+ url,
+ },
+ async function (browser) {
+ let popup = await openSelectPopup("click");
+ let menuitems = popup.querySelectorAll("menuitem");
+ is(
+ getComputedStyle(menuitems[0]).fontSize,
+ "24px",
+ "font-size should be honored"
+ );
+ is(
+ getComputedStyle(menuitems[1]).fontSize,
+ "9px",
+ "minimum font-size should be honored"
+ );
+ }
+ );
+});