mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Update web-platform-tests to revision b'b728032f59a396243864b0f8584e7211e3632005'
This commit is contained in:
parent
ace9b32b1c
commit
df68c4e5d1
15632 changed files with 514865 additions and 155000 deletions
|
@ -25,7 +25,7 @@ test_valid_value("background-position-y", "bottom 10px");
|
|||
test_valid_value("background-position-y", "-20%, 10px");
|
||||
test_valid_value("background-position-y", "center, top, bottom");
|
||||
test_valid_value("background-position-y", "0.5em, y-start, y-end");
|
||||
test_valid_value("background-position-y", "calc(10px - 0.5em), top -20%, bottom 10px", "calc(-0.5em + 10px), top -20%, top 10px");
|
||||
test_valid_value("background-position-y", "calc(10px - 0.5em), top -20%, bottom 10px", "calc(-0.5em + 10px), top -20%, bottom 10px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Background Shorthand Serialization Test: background shorthand should only serialize non-initial values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#background">
|
||||
<meta name="assert" content="background shorthand should only serialize non-initial values">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
const element = document.createElement('div');
|
||||
|
||||
test((t) => {
|
||||
element.style = 'background: yellow;';
|
||||
assert_equals(element.style.background , 'yellow');
|
||||
}, "single value");
|
||||
|
||||
test((t) => {
|
||||
element.style = 'background: no-repeat url(/favicon.ico);';
|
||||
assert_equals(element.style.background , 'url("/favicon.ico") no-repeat');
|
||||
}, "multiple values");
|
||||
|
||||
test((t) => {
|
||||
element.style = 'background: url(/favicon.ico) no-repeat, url(/favicon.ico) no-repeat;';
|
||||
assert_equals(element.style.background , 'url("/favicon.ico") no-repeat, url("/favicon.ico") no-repeat');
|
||||
}, "multiple backgrounds");
|
||||
|
||||
test((t) => {
|
||||
element.style = 'background: url("/favicon.ico") 0% 0% / 10rem;';
|
||||
assert_equals(element.style.background , 'url("/favicon.ico") 0% 0% / 10rem');
|
||||
}, "background-size with non-initial background-position");
|
||||
|
||||
test((t) => {
|
||||
element.style = `background: url(/favicon.ico) top left no-repeat,
|
||||
url(/favicon.ico) center / 100% 100% no-repeat,
|
||||
url(/favicon.ico) white;`;
|
||||
assert_equals(element.style.background , 'url("/favicon.ico") left top no-repeat, url("/favicon.ico") center center / 100% 100% no-repeat, white url("/favicon.ico")');
|
||||
}, "multiple backgrounds with varying values");
|
||||
|
||||
test((t) => {
|
||||
element.style = `background: padding-box border-box;`;
|
||||
assert_equals(element.style.background , 'none');
|
||||
}, "all initial values");
|
||||
</script>
|
|
@ -17,8 +17,8 @@
|
|||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("background-size", "1px", "1px");
|
||||
test_computed_value("background-size", "1px auto", "1px");
|
||||
test_computed_value("background-size", "1px", "1px auto");
|
||||
test_computed_value("background-size", "1px auto", "1px auto");
|
||||
test_computed_value("background-size", "2% 3%");
|
||||
test_computed_value("background-size", "auto");
|
||||
test_computed_value("background-size", "auto auto", "auto");
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// "none" in Edge, "none 100% / 1 / 0 stretch" in Firefox and Blink.
|
||||
test_valid_value("border-image", "none", ["none", "none 100% / 1 / 0 stretch"]);
|
||||
test_valid_value("border-image", "stretch", ["none", "none 100% / 1 / 0 stretch"]);
|
||||
test_valid_value("border-image", "stretch", ["stretch", "none", "none 100% / 1 / 0 stretch"]);
|
||||
test_valid_value("border-image", "none 100% / 1 / 0 stretch", ["none", "none 100% / 1 / 0 stretch"]);
|
||||
|
||||
test_valid_value("border-image", 'url("http://www.example.com/") 1 2 3 4 fill', ['url("http://www.example.com/") 1 2 3 4 fill', 'url("http://www.example.com/") 1 2 3 4 fill / 1 / 0 stretch']);
|
||||
|
@ -28,11 +28,11 @@ test_valid_value("border-image", "repeat round", ["repeat round", "none repeat r
|
|||
test_valid_value("border-image", "none repeat round", ["repeat round", "none repeat round", "none 100% / 1 / 0 repeat round"]);
|
||||
|
||||
test_valid_value("border-image", "space", ["space", "none space space", "none 100% / 1 / 0 space"]);
|
||||
test_valid_value("border-image", "none space space", ["space", "none space space", "none 100% / 1 / 0 space"]);
|
||||
test_valid_value("border-image", "none space space", ["space", "none space space", "none space", "none 100% / 1 / 0 space"]);
|
||||
test_valid_value("border-image", "none 100% / 1 / 0 space", ["space", "none space space", "none 100% / 1 / 0 space"]);
|
||||
|
||||
test_valid_value("border-image", "1", ["1", "none 1 1 1 1", "none 1 / 1 / 0 stretch"]);
|
||||
test_valid_value("border-image", "none 1 1 1 1", ["1", "none 1 1 1 1", "none 1 / 1 / 0 stretch"]);
|
||||
test_valid_value("border-image", "none 1 1 1 1", ["1", "none 1 1 1 1", "none 1", "none 1 / 1 / 0 stretch"]);
|
||||
test_valid_value("border-image", "none 1 / 1 / 0 stretch", ["1", "none 1 1 1 1", "none 1 / 1 / 0 stretch"]);
|
||||
|
||||
test_valid_value("border-image", 'url("http://www.example.com/") 1 2% 3 4%', ['url("http://www.example.com/") 1 2% 3 4%', 'url("http://www.example.com/") 1 2% 3 4% / 1 / 0 stretch']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue