Skip to content

Commit

Permalink
Bug 1594736 [wpt PR 20148] - HTML: test display and box-sizing UA sty…
Browse files Browse the repository at this point in the history
…le for form controls, a=testonly

Automatic update from web-platform-tests
HTML: test display and box-sizing UA style for form controls

Follows whatwg/html#4840

Remove redundant test

--

wpt-commits: ababf6cd0ffc3ba417c29e09ae942b319538b07c
wpt-pr: 20148
  • Loading branch information
zcorpan authored and moz-wptsync-bot committed Oct 2, 2021
1 parent b581838 commit 8178c4e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 21 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,29 @@
input[type=reset i], input[type=button i], input[type=submit i], button {
text-align: center;
}
input[type=radio i], input[type=checkbox i], input[type=reset i], input[type=button i],
input[type=submit i], input[type=color i], input[type=search i], select, button {
box-sizing: border-box;
}
input, button {
display: inline-block;
}
/* in spec prose: */ select, textarea, meter, progress {
display: inline-block;
}
input[type=hidden i] { display: none !important; }
marquee {
text-align: initial;
}
table { display: table; }
caption { display: table-caption; }
colgroup, colgroup[hidden] { display: table-column-group; }
col, col[hidden] { display: table-column; }
thead, thead[hidden] { display: table-header-group; }
tbody, tbody[hidden] { display: table-row-group; }
tfoot, tfoot[hidden] { display: table-footer-group; }
tr, tr[hidden] { display: table-row; }
td, th { display: table-cell; }
table {
text-indent: initial;
}
Expand Down Expand Up @@ -84,7 +104,9 @@
'text-transform',
'text-indent',
'text-shadow',
'text-align'];
'text-align',
'display',
'box-sizing'];
runUAStyleTests(props);

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ function runUAStyleTests(props) {
const testStyle = getComputedStyle(testEl);
const refStyle = getComputedStyle(refEl);
for (const prop of props) {
// Don't test display for some elements.
// TODO(zcorpan): https://github.com/whatwg/html/issues/4093
// TODO(zcorpan): https://github.com/whatwg/html/issues/5063
if (prop === 'display' &&
(testEl.localName === 'optgroup' ||
testEl.localName === 'option' ||
testEl.localName === 'marquee')
) {
continue;
}
test(() => {
assert_equals(testStyle.getPropertyValue(prop), refStyle.getPropertyValue(prop));
}, `${testNameContext(testEl)} - ${prop}`);
Expand Down

0 comments on commit 8178c4e

Please sign in to comment.