mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Bug 1790780 - The options of a select do not honor text-transform. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173607
This commit is contained in:
parent
dbae17218c
commit
10c75a682c
@ -14,5 +14,8 @@ skip-if = os == "linux" # Bug 1329991 - test fails intermittently on Linux build
|
||||
[browser_selectpopup_dir.js]
|
||||
[browser_selectpopup_large.js]
|
||||
[browser_selectpopup_searchfocus.js]
|
||||
[browser_selectpopup_text_transform.js]
|
||||
[browser_selectpopup_user_input.js]
|
||||
[browser_selectpopup_width.js]
|
||||
|
||||
|
||||
|
@ -0,0 +1,40 @@
|
||||
const PAGE = `
|
||||
<!doctype html>
|
||||
<select style="text-transform: uppercase">
|
||||
<option>abc</option>
|
||||
<option>defg</option>
|
||||
</select>
|
||||
`;
|
||||
|
||||
add_task(async function() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["dom.forms.select.customstyling", true]],
|
||||
});
|
||||
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(menuitems[0].textContent, "abc", "Option text should be lowercase");
|
||||
is(menuitems[1].textContent, "defg", "Option text should be lowercase");
|
||||
|
||||
let optionStyle = getComputedStyle(menuitems[0]);
|
||||
is(
|
||||
optionStyle.textTransform,
|
||||
"uppercase",
|
||||
"Option text should be transformed to uppercase"
|
||||
);
|
||||
|
||||
optionStyle = getComputedStyle(menuitems[1]);
|
||||
is(
|
||||
optionStyle.textTransform,
|
||||
"uppercase",
|
||||
"Option text should be transformed to uppercase"
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
@ -22,6 +22,7 @@ const SUPPORTED_OPTION_OPTGROUP_PROPERTIES = [
|
||||
"color",
|
||||
"background-color",
|
||||
"text-shadow",
|
||||
"text-transform",
|
||||
"font-family",
|
||||
"font-weight",
|
||||
"font-size",
|
||||
|
@ -42,6 +42,7 @@ const SUPPORTED_OPTION_OPTGROUP_PROPERTIES = [
|
||||
"color",
|
||||
"background-color",
|
||||
"text-shadow",
|
||||
"text-transform",
|
||||
"font-family",
|
||||
"font-weight",
|
||||
"font-size",
|
||||
|
Loading…
x
Reference in New Issue
Block a user