mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
Update web-platform-tests to revision 10168e9a5d44efbc6e7d416d1d454eb9c9f1396c
This commit is contained in:
parent
c88dc51d03
commit
0e1caebaf4
791 changed files with 23381 additions and 5501 deletions
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Default-Alignment: align-items - setting values via CSS</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-items" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-self-position" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-baseline-position" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-overflow-position" />
|
||||
<link rel="stylesheet" href="../../support/alignment.css" >
|
||||
<meta name="assert" content="Check that the computed value is the specified value and the JS value is empty."/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
let classes = Object.assign({"Normal":"normal", "Stretch":"stretch"}, selfPositionClasses,
|
||||
baselineClasses, overflowClasses);
|
||||
|
||||
for (var key in classes) {
|
||||
let specifiedValue = classes[key];
|
||||
element = document.createElement("div");
|
||||
element.className = "alignItems" + key;
|
||||
document.body.appendChild(element);
|
||||
test(function() {
|
||||
if (specifiedValue === "first baseline")
|
||||
checkValues(element, "alignItems", "align-items", "", "baseline");
|
||||
else
|
||||
checkValues(element, "alignItems", "align-items", "", specifiedValue);
|
||||
}, "Checking align-items: " + specifiedValue);
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Default-Alignment: align-items - 'initial' value</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-items" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-cascade/#initial-values" />
|
||||
<meta name="assert" content="Check the 'initial' value in diferent scenarios."/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
container = document.createElement("div");
|
||||
element = document.createElement("div");
|
||||
container.appendChild(element);
|
||||
document.body.appendChild(container);
|
||||
|
||||
test(function() {
|
||||
element = document.createElement("div");
|
||||
document.body.appendChild(element);
|
||||
checkValues(element, "alignItems", "align-items", "", "normal");
|
||||
}, "Test 'initial' value when nothing is specified");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "";
|
||||
checkInitialValues(element, "alignItems", "align-items", "center", "normal");
|
||||
}, "Test align-items: 'initial'");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "grid";
|
||||
checkInitialValues(element, "alignItems", "align-items", "safe start", "normal");
|
||||
}, "Test grid items align-items: 'initial'");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "flex";
|
||||
checkInitialValues(element, "alignItems", "align-items", "unsafe end", "normal");
|
||||
}, "Test flex items align-items: 'initial'");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "";
|
||||
element.style.position = "absolute";
|
||||
checkInitialValues(element, "alignItems", "align-items", "start", "normal");
|
||||
}, "Test absolute positioned elements align-items: 'initial'");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "grid";
|
||||
element.style.position = "absolute";
|
||||
checkInitialValues(element, "alignItems", "align-items", "end", "normal");
|
||||
}, "Test absolute positioned grid items align-items: 'initial'");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "flex";
|
||||
element.style.position = "absolute";
|
||||
checkInitialValues(element, "alignItems", "align-items", "end", "normal");
|
||||
}, "Test absolute positioned flex items align-items: 'initial'");
|
||||
</script>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Default-Alignment: align-items - setting values via JS</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-items" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-self-position" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-baseline-position" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-overflow-position" />
|
||||
<meta name="assert" content="Check that the computed value is the specified value and the same than the JS value."/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
element = document.createElement("div");
|
||||
document.body.appendChild(element);
|
||||
|
||||
let classes = Object.assign({"Normal":"normal", "Stretch":"stretch"}, selfPositionClasses,
|
||||
baselineClasses, overflowClasses);
|
||||
|
||||
for (var key in classes) {
|
||||
let specifiedValue = classes[key];
|
||||
test(function() {
|
||||
element.style.alignItems = "";
|
||||
element.style.alignItems = specifiedValue;
|
||||
if (specifiedValue === "first baseline")
|
||||
checkValues(element, "alignItems", "align-items", "baseline", "baseline");
|
||||
else
|
||||
checkValues(element, "alignItems", "align-items", specifiedValue, specifiedValue);
|
||||
}, "Checking align-items: " + specifiedValue);
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Default-Alignment: align-items - invalid values</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-items" />
|
||||
<meta name="assert" content="Check bad combinations of specified values."/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
element = document.createElement("div");
|
||||
document.body.appendChild(element);
|
||||
|
||||
let values = ["auto", "legacy", "space-around", "left", "safe right"].concat(invalidPositionValues);
|
||||
|
||||
values.forEach(function(value) {
|
||||
test(function() {
|
||||
checkBadValues(element, "alignItems", "align-items", value);
|
||||
}, "Checking invalid combination - align-items: " + value);
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Default-Alignment: align-items - inherit value</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-items" />
|
||||
<meta name="assert" content="Check bad cobinations of specified values."/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
checkInheritValues("alignItems", "align-items", "end");
|
||||
}, "Test the value 'inherit' overrides current value ('end')");
|
||||
test(function() {
|
||||
checkInheritValues("alignItems", "align-items", "safe start");
|
||||
}, "Test the value 'inherit' overrides current value ('safe start')");
|
||||
test(function() {
|
||||
checkInheritValues("alignItems", "align-items", "unsafe center");
|
||||
}, "Test the value 'inherit' overrides current value ('unsafe center')");
|
||||
</script>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Default-Alignment: justify-items - setting values via CSS</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-items" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-self-position" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-baseline-position" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-overflow-position" />
|
||||
<link rel="stylesheet" href="../../support/alignment.css" >
|
||||
<meta name="assert" content="Check that the computed value is the specified value and the JS value is empty."/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
let classes = Object.assign({"Normal":"normal", "Stretch":"stretch", "Left":"left", "Right":"right"},
|
||||
selfPositionClasses, baselineClasses, overflowClasses);
|
||||
|
||||
for (var key in classes) {
|
||||
let specifiedValue = classes[key];
|
||||
element = document.createElement("div");
|
||||
element.className = "justifyItems" + key;
|
||||
document.body.appendChild(element);
|
||||
test(function() {
|
||||
if (specifiedValue === "first baseline")
|
||||
checkValues(element, "justifyItems", "justify-items", "", "baseline");
|
||||
else
|
||||
checkValues(element, "justifyItems", "justify-items", "", specifiedValue);
|
||||
}, "Checking justify-items: " + specifiedValue);
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Default-Alignment: justify-items - 'initial' value</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-items" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-cascade/#initial-values" />
|
||||
<meta name="assert" content="Check the 'initial' value in diferent scenarios."/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
container = document.createElement("div");
|
||||
element = document.createElement("div");
|
||||
container.appendChild(element);
|
||||
document.body.appendChild(container);
|
||||
|
||||
test(function() {
|
||||
element = document.createElement("div");
|
||||
document.body.appendChild(element);
|
||||
checkValues(element, "justifyItems", "justify-items", "", "legacy");
|
||||
}, "Test 'initial' value when nothing is specified");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "";
|
||||
checkInitialValues(element, "justifyItems", "justify-items", "center", "legacy");
|
||||
}, "Test justify-items: 'initial'");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "grid";
|
||||
checkInitialValues(element, "justifyItems", "justify-items", "safe start", "legacy");
|
||||
}, "Test grid items justify-items: 'initial'");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "flex";
|
||||
checkInitialValues(element, "justifyItems", "justify-items", "unsafe end", "legacy");
|
||||
}, "Test flex items justify-items: 'initial'");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "";
|
||||
element.style.position = "absolute";
|
||||
checkInitialValues(element, "justifyItems", "justify-items", "start", "legacy");
|
||||
}, "Test absolute positioned elements justify-items: 'initial'");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "grid";
|
||||
element.style.position = "absolute";
|
||||
checkInitialValues(element, "justifyItems", "justify-items", "end", "legacy");
|
||||
}, "Test absolute positioned grid items justify-items: 'initial'");
|
||||
|
||||
test(function() {
|
||||
container.style.display = "flex";
|
||||
element.style.position = "absolute";
|
||||
checkInitialValues(element, "justifyItems", "justify-items", "end", "legacy");
|
||||
}, "Test absolute positioned flex items justify-items: 'initial'");
|
||||
</script>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Default-Alignment: justify-items - setting values via JS</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-items" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-self-position" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-baseline-position" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-overflow-position" />
|
||||
<meta name="assert" content="Check that the computed value is the specified value and the same than the JS value."/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
element = document.createElement("div");
|
||||
document.body.appendChild(element);
|
||||
|
||||
let classes = Object.assign({"Normal":"normal", "Stretch":"stretch", "Left":"left", "Right":"right"},
|
||||
selfPositionClasses, baselineClasses, overflowClasses);
|
||||
|
||||
for (var key in classes) {
|
||||
let specifiedValue = classes[key];
|
||||
test(function() {
|
||||
element.style.justifyItems = "";
|
||||
element.style.justifyItems = specifiedValue;
|
||||
if (specifiedValue === "first baseline")
|
||||
checkValues(element, "justifyItems", "justify-items", "baseline", "baseline");
|
||||
else
|
||||
checkValues(element, "justifyItems", "justify-items", specifiedValue, specifiedValue);
|
||||
}, "Checking justify-items: " + specifiedValue);
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Default-Alignment: justify-items - invalid values</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-items" />
|
||||
<meta name="assert" content="Check bad combinations of specified values."/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
element = document.createElement("div");
|
||||
document.body.appendChild(element);
|
||||
|
||||
let values = ["auto", "space-around"].concat(invalidPositionValues, invalidLegacyValues);
|
||||
|
||||
values.forEach(function(value) {
|
||||
test(function() {
|
||||
checkBadValues(element, "justifyItems", "justify-items", value);
|
||||
}, "Checking invalid combination - justify-items: " + value);
|
||||
});
|
||||
|
||||
</script>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Default-Alignment: justify-items - inherit value</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-items" />
|
||||
<meta name="assert" content="Check the 'inherit' value in different scenarios."/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
checkInheritValues("justifyItems", "justify-items", "end");
|
||||
}, "Test the value 'inherit' overrides current value ('end')");
|
||||
test(function() {
|
||||
checkInheritValues("justifyItems", "justify-items", "safe left");
|
||||
}, "Test the value 'inherit' overrides current value ('safe left')");
|
||||
test(function() {
|
||||
checkInheritValues("justifyItems", "justify-items", "unsafe center");
|
||||
}, "Test the value 'inherit' overrides current value ('unsafe center')");
|
||||
</script>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Default-Alignment: justify-items - use of the 'legacy' keyword</title>
|
||||
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#default-alignment" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-items" />
|
||||
<meta name="assert" content="Check the use of the 'legacy' keyword in different scenarios."/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
checkLegacyValues("justifyItems", "justify-items", "legacy left");
|
||||
}, "Test the value justify-items: legacy left");
|
||||
test(function() {
|
||||
checkLegacyValues("justifyItems", "justify-items", "legacy center");
|
||||
}, "Test the value justify-items: legacy center");
|
||||
test(function() {
|
||||
checkLegacyValues("justifyItems", "justify-items", "legacy right");
|
||||
}, "Test the value justify-items: legacy right");
|
||||
</script>
|
|
@ -5,13 +5,14 @@
|
|||
<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>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
var values = ["normal", "stretch"].concat(selfPositionValues, baselineValues);
|
||||
values.forEach(function(value) {
|
||||
let classes = Object.assign({"Normal":"normal", "Stretch":"stretch"}, selfPositionClasses, baselineClasses);
|
||||
for (var key in classes) {
|
||||
let value = classes[key];
|
||||
test(function() {
|
||||
checkPlaceShorhandLonghands("place-items", "align-items", "justify-items", value);
|
||||
}, "Checking place-items: " + value);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -5,15 +5,18 @@
|
|||
<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>
|
||||
<script src="/css/css-align/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) {
|
||||
let classes = Object.assign({"Normal":"normal", "Stretch":"stretch"}, selfPositionClasses, baselineClasses);
|
||||
for (var key1 in classes) {
|
||||
let alignValue = classes[key1];
|
||||
let classes2 = Object.assign({"Left":"left", "Right":"right"}, classes);
|
||||
for (var key2 in classes2) {
|
||||
let justifyValue = classes2[key2];
|
||||
test(function() {
|
||||
checkPlaceShorhandLonghands("place-items", "align-items", "justify-items", alignValue, justifyValue);
|
||||
}, "Checking place-items: " + alignValue + " " + justifyValue);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<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>
|
||||
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
function checkInvalidValues(value)
|
||||
|
@ -14,14 +14,20 @@
|
|||
}
|
||||
|
||||
test(function() {
|
||||
checkInvalidValues("center safe")
|
||||
checkInvalidValues("true center")
|
||||
checkInvalidValues("safe center")
|
||||
checkInvalidValues("unsafe center")
|
||||
}, "Verify overflow keywords are invalid");
|
||||
|
||||
test(function() {
|
||||
checkInvalidValues("center space-between start")
|
||||
}, "Verify fallback values are invalid");
|
||||
|
||||
test(function() {
|
||||
checkInvalidValues("left")
|
||||
checkInvalidValues("left start")
|
||||
checkInvalidValues("right center")
|
||||
}, "Verify 'left' and 'right' values are invalid for block/cross axis alignment");
|
||||
|
||||
test(function() {
|
||||
checkInvalidValues("10px left")
|
||||
checkInvalidValues("right 10%")
|
||||
|
|
|
@ -5,16 +5,19 @@
|
|||
<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>
|
||||
<script src="/css/css-align/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) {
|
||||
let classes = Object.assign({"Normal":"normal", "Stretch":"stretch"}, selfPositionClasses, baselineClasses);
|
||||
for (var key1 in classes) {
|
||||
let alignValue = classes[key1];
|
||||
let classes2 = Object.assign({"Left":"left", "Right":"right"}, classes);
|
||||
for (var key2 in classes2) {
|
||||
let justifyValue = classes2[key2];
|
||||
var value = (alignValue + " " + justifyValue).trim();
|
||||
test(function() {
|
||||
checkPlaceShorhand("place-items", alignValue, justifyValue)
|
||||
checkPlaceShorhand("place-items", value, alignValue, justifyValue)
|
||||
}, "Checking place-items: " + value);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue