Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444

This commit is contained in:
Josh Matthews 2017-04-17 12:06:02 +10:00 committed by Anthony Ramine
parent 25e8bf69e6
commit 665817d2a6
35333 changed files with 1818077 additions and 16036 deletions

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<title>CSS Box Alignment: place-items 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-items-property" />
<meta name="assert" content="Check that setting a single value to place-items expands to such value set in both 'align-items' and 'justify-items'." />
<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", "stretch"].concat(selfPositionValues, baselineValues);
values.forEach(function(value) {
test(function() {
checkPlaceShorhandLonghands("place-items", "align-items", "justify-items", value);
}, "Checking place-items: " + value);
});
</script>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<title>CSS Box Alignment: place-items 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-items-property" />
<meta name="assert" content="Check that setting two values to place-items sets the first one to 'align-items' and the second one to 'justify-items'." />
<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", "stretch"].concat(selfPositionValues, baselineValues);
values.forEach(function(alignValue) {
["auto"].concat(values).forEach(function(justifyValue) {
test(function() {
checkPlaceShorhandLonghands("place-items", "align-items", "justify-items", alignValue, justifyValue);
}, "Checking place-items: " + alignValue + " " + justifyValue);
});
});
</script>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<title>CSS Box Alignment: place-items 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-items-property" />
<meta name="assert" content="Check that place-items's 'initial' value expands to 'align-items' and 'justify-items'." />
<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-items"] = "start";
div.style["justify-items"] = "end";
div.setAttribute("style", "place-items: initial");
test(function() {
assert_equals(div.style["align-items"],
"initial", "place-items expanded value for align-items");
}, "Check place-items: initial - align-items expanded value");
test(function() {
assert_equals(div.style["justify-items"],
"initial", "place-items expanded value for justify-items");
}, "Check place-items: initial - justify-items expanded value");
</script>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<title>CSS Box Alignment: place-items 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-items-property" />
<meta name="assert" content="Check that place-items'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-items", "align-items", "justify-items", 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")
}, "Verify 'auto' value is invalid as first longhand value.");
test(function() {
checkInvalidValues("")
}, "Verify empty declaration is invalid");
</script>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<title>CSS Box Alignment: place-items 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-items-property" />
<meta name="assert" content="Check that place-items's 'inherit' value expands to 'align-items' and 'justify-items'." />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#test {
place-items: 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-items: inherit");
var style = getComputedStyle(child);
test(function() {
assert_equals(style.getPropertyValue("align-items"),
"start", "place-items resolved value for align-items");
}, "Check place-items: inherit - align-items resolved value");
test(function() {
assert_equals(style.getPropertyValue("justify-items"),
"end", "place-items resolved value for justify-items");
}, "Check place-items: inherit - justify-items resolved value");
</script>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<title>CSS Box Alignment: place-items 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-items-property" />
<meta name="assert" content="Check the place-items'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 = ["normal", "stretch"].concat(selfPositionValues, baselineValues);
values.forEach(function(alignValue) {
["", "auto"].concat(values).forEach(function(justifyValue) {
var value = (alignValue + " " + justifyValue).trim();
test(function() {
checkPlaceShorhand("place-items", alignValue, justifyValue)
}, "Checking place-items: " + value);
});
});
</script>