mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35: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,26 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Box Alignment: legacy value for justify-items</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align/#justify-items-property">
|
||||
<meta name="assert" content="Tests that legacy justify-items values are correctly inherited.">
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<style>
|
||||
#container {
|
||||
justify-items: legacy center;
|
||||
}
|
||||
</style>
|
||||
<div id="container"><span id="child"></span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(getComputedStyle(child).justifyItems, "legacy center",
|
||||
"default justify-items resolves to the parent justify-items value if legacy")
|
||||
container.style.justifyItems = "legacy left";
|
||||
assert_equals(getComputedStyle(child).justifyItems, "legacy left",
|
||||
"dynamic changes to justify-items propagate to children if needed (legacy)")
|
||||
container.style.justifyItems = "left";
|
||||
assert_equals(getComputedStyle(child).justifyItems, "normal",
|
||||
"dynamic changes to justify-items propagate to children if needed (left)")
|
||||
}, "legacy value for justify-items")
|
||||
</script>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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) {
|
||||
[""].concat(values).forEach(function(justifyValue) {
|
||||
var value = (alignValue + " " + justifyValue).trim();
|
||||
test(function() {
|
||||
checkPlaceShorhand("place-items", alignValue, justifyValue)
|
||||
}, "Checking place-items: " + value);
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue