forked from mykmelez/gecko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1490645 [wpt PR 12965] - HTML: legend align maps to 'justify-self…
…', 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
1 parent
996a0e1
commit cbb2c37
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ing/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-justify-self.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |