mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-content 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/#propdef-place-content" />
|
||||
<meta name="assert" content="Check that setting a single value to place-content expands to such value set in both 'align-content' and 'justify-content'." />
|
||||
<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 = ["normal"].concat(contentPositionValues, distributionValues, baselineValues);
|
||||
values.forEach(function(value) {
|
||||
test(function() {
|
||||
checkPlaceShorhandLonghands("place-content", "align-content", "justify-content", value);
|
||||
}, "Checking place-content: " + value);
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-content 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/#propdef-place-content" />
|
||||
<meta name="assert" content="Check that setting two values to place-content sets the first one to 'align-content' and the second one to 'justify-content'." />
|
||||
<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 = ["normal"].concat(contentPositionValues, distributionValues, baselineValues);
|
||||
values.forEach(function(alignValue) {
|
||||
values.forEach(function(justifyValue) {
|
||||
test(function() {
|
||||
checkPlaceShorhandLonghands("place-content", "align-content", "justify-content", alignValue, justifyValue);
|
||||
}, "Checking place-content: " + alignValue + " " + justifyValue);
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-content 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/#propdef-place-content" />
|
||||
<meta name="assert" content="Check that place-content's 'initial' value expands to 'align-content' and 'justify-content'." />
|
||||
<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-content"] = "start";
|
||||
div.style["justify-content"] = "end";
|
||||
div.setAttribute("style", "place-content: initial");
|
||||
|
||||
test(function() {
|
||||
assert_equals(div.style["align-content"],
|
||||
"initial", "place-content specified value for align-content");
|
||||
}, "Check place-content: initial - align-content expanded value");
|
||||
|
||||
test(function() {
|
||||
assert_equals(div.style["justify-content"],
|
||||
"initial", "place-content specified value for justify-content");
|
||||
}, "Check place-content: initial - justify-content expanded value");
|
||||
</script>
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-content 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/#propdef-place-content" />
|
||||
<meta name="assert" content="Check that place-content'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-content", "align-content", "justify-content", 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("auto")
|
||||
checkInvalidValues("auto right")
|
||||
checkInvalidValues("auto auto")
|
||||
checkInvalidValues("left auto")
|
||||
}, "Verify 'auto' values are invalid");
|
||||
|
||||
test(function() {
|
||||
checkInvalidValues("")
|
||||
}, "Verify empty declaration is invalid");
|
||||
</script>
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-content 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/#propdef-place-content" />
|
||||
<meta name="assert" content="Check that place-content's 'inherit' value expands to 'align-content' and 'justify-content'." />
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
#test {
|
||||
place-content: 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-content: inherit");
|
||||
var style = getComputedStyle(child);
|
||||
|
||||
test(function() {
|
||||
assert_equals(style.getPropertyValue("align-content"),
|
||||
"start", "place-content resolved value for align-content");
|
||||
}, "Check place-content: inherit - align-content resolved value");
|
||||
|
||||
test(function() {
|
||||
assert_equals(style.getPropertyValue("justify-content"),
|
||||
"end", "place-content resolved value for justify-content");
|
||||
}, "Check place-content: inherit - justify-content resolved value");
|
||||
</script>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Box Alignment: place-content 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/#propdef-place-content" />
|
||||
<meta name="assert" content="Check the place-content'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>
|
||||
<div id="test"></div>
|
||||
<script>
|
||||
var values = ["normal"].concat(contentPositionValues, distributionValues, baselineValues);
|
||||
values.forEach(function(alignValue) {
|
||||
[""].concat(values).forEach(function(justifyValue) {
|
||||
var value = (alignValue + " " + justifyValue).trim();
|
||||
test(function() {
|
||||
checkPlaceShorhand("place-content", alignValue, justifyValue)
|
||||
}, "Checking place-content: " + value);
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue