Skip to content

Commit

Permalink
Bug 1490645 [wpt PR 12965] - HTML: legend align maps to 'justify-self…
Browse files Browse the repository at this point in the history
…', a=testonly

Automatic update from web-platform-testsHTML: legend align maps to 'justify-self'

See
whatwg/html#3934
whatwg/html#4013
--

wpt-commits: 51ceab16ec539fd421322727f93a847f7855e317
wpt-pr: 12965
  • Loading branch information
zcorpan authored and moz-wptsync-bot committed Sep 20, 2018
1 parent 996a0e1 commit cbb2c37
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
10 changes: 10 additions & 0 deletions testing/web-platform/meta/MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -361160,6 +361160,12 @@
{}
]
],
"html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-justify-self.html": [
[
"/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-justify-self.html",
{}
]
],
"html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-text-align.html": [
[
"/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-text-align.html",
Expand Down Expand Up @@ -608237,6 +608243,10 @@
"c11b466669665a29fc4f33b4bbc14c6b5598d545",
"reftest"
],
"html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-justify-self.html": [
"29df29d17778a9d3d592c5e942f093a44f419b3c",
"testharness"
],
"html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-text-align.html": [
"01483bf8ad3cee01272ba36bc0ffaf73c1b12cad",
"testharness"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<title>legend align to justify-self</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<fieldset><legend>x</legend></fieldset>
<fieldset><legend align=left>x</legend></fieldset>
<fieldset><legend align=center>x</legend></fieldset>
<fieldset><legend align=right>x</legend></fieldset>
<fieldset><legend align=lEfT>x</legend></fieldset>
<fieldset><legend align=cEnTeR>x</legend></fieldset>
<fieldset><legend align=rIgHt>x</legend></fieldset>
<!-- invalid values -->
<fieldset><legend align=justify>x</legend></fieldset>
<fieldset><legend align="left ">x</legend></fieldset>
<!-- dir -->
<fieldset><legend dir=ltr>x</legend></fieldset>
<fieldset><legend dir=rtl>x</legend></fieldset>
<fieldset dir=rtl><legend dir=ltr>x</legend></fieldset>
<fieldset dir=rtl><legend dir=rtl>x</legend></fieldset>
<script>
for (const fieldset of document.querySelectorAll('fieldset')) {
test(() => {
const legend = fieldset.firstChild;
const align = legend.align.toLowerCase();
let expected = 'auto';
switch (align) {
case 'left': expected = 'left'; break;
case 'center': expected = 'center'; break;
case 'right': expected = 'right'; break;
}
assert_equals(getComputedStyle(legend).justifySelf, expected);
}, `${fieldset.outerHTML}`)
}
</script>

0 comments on commit cbb2c37

Please sign in to comment.