Update web-platform-tests to revision b'544363de4568baf9ae90d71e4822661edc546650'

This commit is contained in:
WPT Sync Bot 2023-01-28 01:49:33 +00:00
parent 4d5a804d03
commit 32cc2e03c4
197 changed files with 3539 additions and 2824 deletions

View file

@ -124,4 +124,22 @@
& .c { color: blue; }
}`, 'color is changed, new rule is ignored');
});
// We cannot insert anything starting with an tag, as that would cause
// the serialized rule not to parse back. Compounds starting with a tag
// that are _not_ the first compound in a complex selector are OK, though,
// as are complex selectors that are not the first in the list.
test(() => {
document.getElementById('ss').innerHTML = sampleSheetText;
let [ss] = document.styleSheets;
ss.cssRules[0].cssRules[0].selectorText = 'div.b .c &'; // Ignored.
ss.cssRules[0].cssRules[1].selectorText = '.c div.b &, div &'; // Allowed.
assert_throws_dom('SyntaxError', () => { ss.cssRules[0].insertRule('div & {}'); });
assert_equals(ss.cssRules[0].cssText,
`.a {
color: red;
& .b { color: green; }
.c div.b &, div & { color: blue; }
}`, 'one rule is kept unchanged, the other is changed');
});
</script>