Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'

This commit is contained in:
WPT Sync Bot 2021-09-07 11:16:33 +00:00 committed by cybai
parent 35e95f55a1
commit 58e8ee674b
9438 changed files with 266112 additions and 106976 deletions

View file

@ -11,8 +11,7 @@ should be allowed." />
<body></body>
<script>
// Sticky is valid for all elements except table-column-group and table-column.
const VALID_STICKY_DISPLAY_TYPES = [
const displayTypes = [
'block',
'inline',
'run-in',
@ -30,6 +29,10 @@ const VALID_STICKY_DISPLAY_TYPES = [
'table-row',
'table-cell',
'table-caption',
// Sticky does not apply to table-column or table-column-group, but the
// computed value should still be sticky.
'table-column',
'table-column-group',
'ruby-base',
'ruby-text',
'ruby-base-container',
@ -38,13 +41,8 @@ const VALID_STICKY_DISPLAY_TYPES = [
'none',
];
const INVALID_STICKY_DISPLAY_TYPES = [
'table-column-group',
'table-column',
];
test(() => {
for (displayValue of VALID_STICKY_DISPLAY_TYPES) {
for (displayValue of displayTypes) {
let div = document.createElement('div');
let style = `position: sticky; display: ${displayValue};`;
div.setAttribute('style', style);
@ -57,17 +55,5 @@ test(() => {
}
document.body.removeChild(div);
}
for (displayValue of INVALID_STICKY_DISPLAY_TYPES) {
let div = document.createElement('div');
let style = `position: sticky; display: ${displayValue};`;
div.setAttribute('style', style);
document.body.appendChild(div);
assert_not_equals(getComputedStyle(div).position, 'sticky',
`Expected sticky to be invalid for display: ${displayValue}`);
document.body.removeChild(div);
}
}, 'The value of sticky for the position property should be parsed correctly');
</script>