Update web-platform-tests to revision b'afdce893ed51bc1a7a7ac03b16b5a575caad071a'

This commit is contained in:
WPT Sync Bot 2023-03-17 01:51:32 +00:00
parent a8da28e55d
commit 3b420af385
393 changed files with 17484 additions and 4185 deletions

View file

@ -104,4 +104,18 @@ testTokenPairs("+", "123em");
testTokenPairs("/", "*");
// Test that interior comments are preserved, but exterior ones are not.
function testComments(text, t1, expected) {
const b = document.body;
test(()=>{
b.style.setProperty("--t1", t1);
b.style.setProperty("--result", text);
const result = getComputedStyle(b).getPropertyValue("--result");
assert_equals(result, expected);
}, `Comments are handled correctly when computing ${text} using t1:${t1}.`);
}
testComments("a/* comment */b", "", "a/* comment */b");
testComments("a/* comment */var(--t1)", "b", "a/**/b");
testComments("var(--t1)b", "a/* comment */", "a/**/b");
</script>