mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision b'afdce893ed51bc1a7a7ac03b16b5a575caad071a'
This commit is contained in:
parent
a8da28e55d
commit
3b420af385
393 changed files with 17484 additions and 4185 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue