diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /browser/base/content/test/forms/browser_selectpopup_minFontSize.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz firefox-adbda400be353e676059e335c3c0aaf99e719475.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/base/content/test/forms/browser_selectpopup_minFontSize.js')
-rw-r--r-- | browser/base/content/test/forms/browser_selectpopup_minFontSize.js | 38 |
1 files changed, 38 insertions, 0 deletions
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" + ); + } + ); +}); |