mirror of
https://github.com/servo/servo.git
synced 2025-08-18 20:05:34 +01:00
Update web-platform-tests to revision 58b72393db0bd273bb93268c33666cf893feb985
This commit is contained in:
parent
43a4f01647
commit
64e0a52537
12717 changed files with 59835 additions and 59820 deletions
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-self shorthand - single values specified</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-align/#place-self-property" />
|
||||
<meta name="assert" content="Check that setting a single value to place-self expands to such value set in both 'align-self' and 'justify-self'." />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
var values = ["auto", "normal", "stretch"].concat(selfPositionValues, baselineValues);
|
||||
values.forEach(function(value) {
|
||||
test(function() {
|
||||
checkPlaceShorhandLonghands("place-self", "align-self", "justify-self", value);
|
||||
}, "Checking place-self: " + value);
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-self shorthand - multiple values specified</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-align/#place-self-property" />
|
||||
<meta name="assert" content="Check that setting two values to place-self sets the first one to 'align-self' and the second one to 'justify-self'." />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
var values = ["auto", "normal", "stretch"].concat(selfPositionValues, baselineValues);
|
||||
values.forEach(function(alignValue) {
|
||||
values.forEach(function(justifyValue) {
|
||||
test(function() {
|
||||
checkPlaceShorhandLonghands("place-self", "align-self", "justify-self", alignValue, justifyValue);
|
||||
}, "Checking place-self: " + alignValue + " " + justifyValue);
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-self shorthand - initial value</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-align/#place-self-property" />
|
||||
<meta name="assert" content="Check that place-self's 'initial' value expands to 'align-self' and 'justify-self'." />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
var div = document.createElement("div");
|
||||
document.body.appendChild(div);
|
||||
div.style["align-self"] = "start";
|
||||
div.style["justify-self"] = "end";
|
||||
div.setAttribute("style", "place-self: initial");
|
||||
|
||||
test(function() {
|
||||
assert_equals(div.style["align-self"],
|
||||
"initial", "place-self specified value for align-self");
|
||||
}, "Check place-self: initial - align-self expanded value");
|
||||
|
||||
test(function() {
|
||||
assert_equals(div.style["justify-self"],
|
||||
"initial", "place-self specified value for justify-self");
|
||||
}, "Check place-self: initial - justify-self expanded value");
|
||||
</script>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-self shorthand - invalid values</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-align/#place-self-property" />
|
||||
<meta name="assert" content="Check that place-self's invalid values are properly detected at parsing time." />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
function checkInvalidValues(value)
|
||||
{
|
||||
checkPlaceShorthandInvalidValues("place-self", "align-self", "justify-self", value);
|
||||
}
|
||||
|
||||
test(function() {
|
||||
checkInvalidValues("center safe")
|
||||
checkInvalidValues("true center")
|
||||
}, "Verify overflow keywords are invalid");
|
||||
|
||||
test(function() {
|
||||
checkInvalidValues("center space-between start")
|
||||
}, "Verify fallback values are invalid");
|
||||
|
||||
test(function() {
|
||||
checkInvalidValues("10px left")
|
||||
checkInvalidValues("right 10%")
|
||||
}, "Verify numeric values are invalid");
|
||||
|
||||
test(function() {
|
||||
checkInvalidValues("")
|
||||
}, "Verify empty declaration is invalid");
|
||||
</script>
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-self shorthand - inherit value</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-align/#place-self-property" />
|
||||
<meta name="assert" content="Check that place-self's 'inherit' value expands to 'align-self' and 'justify-self'." />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
#test {
|
||||
place-self: start end;
|
||||
}
|
||||
</style>
|
||||
<div id="log"></div>
|
||||
<div id="test"></div>
|
||||
<script>
|
||||
var child = document.createElement("div");
|
||||
document.getElementById("test").appendChild(child);
|
||||
child.setAttribute("style", "place-self: inherit");
|
||||
var style = getComputedStyle(child);
|
||||
|
||||
test(function() {
|
||||
assert_equals(style.getPropertyValue("align-self"),
|
||||
"start", "place-self resolved value for align-self");
|
||||
}, "Check place-self: inherit - align-self resolved value");
|
||||
|
||||
test(function() {
|
||||
assert_equals(style.getPropertyValue("justify-self"),
|
||||
"end", "place-self resolved value for justify-self");
|
||||
}, "Check place-self: inherit - justify-self resolved value");
|
||||
</script>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-self shorthand - Shorthand 'specified' and 'resolved' value</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-align/#place-self-property" />
|
||||
<meta name="assert" content="Check the place-self's 'specified' and 'resolved' values serialization." />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
var values = ["auto", "normal", "stretch"].concat(selfPositionValues, baselineValues);
|
||||
values.forEach(function(alignValue) {
|
||||
[""].concat(values).forEach(function(justifyValue) {
|
||||
var value = (alignValue + " " + justifyValue).trim();
|
||||
test(function() {
|
||||
checkPlaceShorhand("place-self", alignValue, justifyValue)
|
||||
}, "Checking place-self: " + value);
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue