mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision a412aa768f8558ec93bcab7e7f1aabcce6f38e88
This commit is contained in:
parent
b3eed5b5bd
commit
653b871d4f
64 changed files with 2136 additions and 64 deletions
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Logical Properties and Values: parsing margin-block and margin-inline with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-margin-block">
|
||||
<meta name="assert" content="margin-block, margin-inline support only the grammar '<'margin-top'>{1,2}'.">
|
||||
<meta name="assert" content="margin-block, margin-inline longhands support only the grammar '<'margin-top'>'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("margin-block-start", "none");
|
||||
test_invalid_value("margin-block-end", "10");
|
||||
test_invalid_value("margin-inline-start", "20% calc(10px - 0.5em)");
|
||||
test_invalid_value("margin-inline-end", "10px, auto");
|
||||
|
||||
test_invalid_value("margin-block", "none");
|
||||
test_invalid_value("margin-block", "20%, calc(10px - 0.5em)");
|
||||
test_invalid_value("margin-inline", "10px auto 20px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Logical Properties and Values: parsing margin-block and margin-inline with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-margin-block">
|
||||
<meta name="assert" content="margin-block, margin-inline support the full grammar '<'margin-top'>{1,2}'.">
|
||||
<meta name="assert" content="margin-block, margin-inline longhands support the full grammar '<'margin-top'>'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("margin-block-start", "calc(20% + 10px)");
|
||||
test_valid_value("margin-block-start", "auto");
|
||||
test_valid_value("margin-block-end", "-10px");
|
||||
test_valid_value("margin-inline-start", "-20%");
|
||||
test_valid_value("margin-inline-end", "calc(2em + 3ex)");
|
||||
|
||||
test_valid_value("margin-block", "auto");
|
||||
test_valid_value("margin-block", "-10px");
|
||||
test_valid_value("margin-block", "calc(2em + 3ex) -20%");
|
||||
test_valid_value("margin-block", "auto auto", "auto");
|
||||
test_valid_value("margin-block", "-20% calc(20% + 10px)");
|
||||
test_valid_value("margin-inline", "20%");
|
||||
test_valid_value("margin-inline", "calc(2em + 3ex)");
|
||||
test_valid_value("margin-inline", "-10px auto");
|
||||
test_valid_value("margin-inline", "auto calc(2em + 3ex)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Logical Properties and Values: getComputedValue().maxBlockSize</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-max-block-size">
|
||||
<meta name="assert" content="Computed max-block-size is the specified keyword, or the length-percentage made absolute.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("max-block-size", "none");
|
||||
|
||||
test_computed_value("max-block-size", "10px");
|
||||
test_computed_value("max-block-size", "20%");
|
||||
test_computed_value("max-block-size", "calc(10px + 0.5em)", "30px");
|
||||
test_computed_value("max-block-size", "calc(10px - 0.5em)", "0px");
|
||||
test_computed_value("max-block-size", "calc(20% + 10px)");
|
||||
|
||||
test_computed_value("max-block-size", "min-content");
|
||||
test_computed_value("max-block-size", "max-content");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Logical Properties and Values: getComputedValue().maxInlineSize</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-max-inline-size">
|
||||
<meta name="assert" content="Computed max-inline-size is the specified keyword, or the length-percentage made absolute.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("max-inline-size", "none");
|
||||
|
||||
test_computed_value("max-inline-size", "10px");
|
||||
test_computed_value("max-inline-size", "20%");
|
||||
test_computed_value("max-inline-size", "calc(10px + 0.5em)", "30px");
|
||||
test_computed_value("max-inline-size", "calc(10px - 0.5em)", "0px");
|
||||
test_computed_value("max-inline-size", "calc(20% + 10px)");
|
||||
|
||||
test_computed_value("max-inline-size", "min-content");
|
||||
test_computed_value("max-inline-size", "max-content");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Logical Properties and Values: getComputedValue().minBlockSize</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-min-block-size">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#min-size-auto">
|
||||
<meta name="assert" content="Computed min-block-size is the specified keyword, or the length-percentage made absolute.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
#container {
|
||||
display: flex;
|
||||
}
|
||||
#box {
|
||||
min-block-size: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<div id="container">
|
||||
<div id="box"></div>
|
||||
</div>
|
||||
<script>
|
||||
test_computed_value("min-block-size", "auto", "0px");
|
||||
|
||||
test_computed_value("min-block-size", "10px");
|
||||
test_computed_value("min-block-size", "20%");
|
||||
test_computed_value("min-block-size", "calc(10px + 0.5em)", "30px");
|
||||
test_computed_value("min-block-size", "calc(10px - 0.5em)", "0px");
|
||||
test_computed_value("min-block-size", "calc(20% + 10px)");
|
||||
|
||||
test_computed_value("min-block-size", "min-content");
|
||||
test_computed_value("min-block-size", "max-content");
|
||||
|
||||
test(() => {
|
||||
const picture = document.getElementById('box');
|
||||
assert_equals(getComputedStyle(picture).minBlockSize, 'auto');
|
||||
}, 'min-block-size auto computes to auto with flex layout.');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Logical Properties and Values: getComputedValue().minInlineSize</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-min-inline-size">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#min-size-auto">
|
||||
<meta name="assert" content="Computed min-inline-size is the specified keyword, or the length-percentage made absolute.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
#container {
|
||||
display: flex;
|
||||
}
|
||||
#box {
|
||||
min-inline-size: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<div id="container">
|
||||
<div id="box"></div>
|
||||
</div>
|
||||
<script>
|
||||
test_computed_value("min-inline-size", "auto", "0px");
|
||||
|
||||
test_computed_value("min-inline-size", "10px");
|
||||
test_computed_value("min-inline-size", "20%");
|
||||
test_computed_value("min-inline-size", "calc(10px + 0.5em)", "30px");
|
||||
test_computed_value("min-inline-size", "calc(10px - 0.5em)", "0px");
|
||||
test_computed_value("min-inline-size", "calc(20% + 10px)");
|
||||
|
||||
test_computed_value("min-inline-size", "min-content");
|
||||
test_computed_value("min-inline-size", "max-content");
|
||||
|
||||
test(() => {
|
||||
const picture = document.getElementById('box');
|
||||
assert_equals(getComputedStyle(picture).minInlineSize, 'auto');
|
||||
}, 'min-inline-size auto computes to auto with flex layout.');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Logical Properties and Values: parsing padding-block and padding-inline with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-padding-block">
|
||||
<meta name="assert" content="padding-block, padding-inline support only the grammar '<'padding-top'>{1,2}'.">
|
||||
<meta name="assert" content="padding-block, padding-inline longhands support only the grammar '<'padding-top'>'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("padding-block-start", "none");
|
||||
test_invalid_value("padding-block-start", "-10px");
|
||||
test_invalid_value("padding-block-end", "1px 2px");
|
||||
test_invalid_value("padding-block-end", "auto");
|
||||
test_invalid_value("padding-block-end", "10");
|
||||
test_invalid_value("padding-block-end", "1px, 2px");
|
||||
test_invalid_value("padding-inline-start", "20% calc(10px - 0.5em)");
|
||||
test_invalid_value("padding-inline-start", "2px auto");
|
||||
test_invalid_value("padding-inline-end", "-20%");
|
||||
test_invalid_value("padding-inline-end", "10px, auto");
|
||||
|
||||
test_invalid_value("padding-block", "none");
|
||||
test_invalid_value("padding-block", "20% -10px");
|
||||
test_invalid_value("padding-block", "auto, -10px");
|
||||
test_invalid_value("padding-block", "20%, calc(10px - 0.5em)");
|
||||
test_invalid_value("padding-inline", "10px auto 20px");
|
||||
test_invalid_value("padding-inline", "1px 2px 3px");
|
||||
test_invalid_value("padding-inline", "-20% calc(20% + 10px)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Logical Properties and Values: parsing padding-block and padding-inline with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-padding-block">
|
||||
<meta name="assert" content="padding-block, padding-inline support the full grammar '<'padding-top'>{1,2}'.">
|
||||
<meta name="assert" content="padding-block, padding-inline longhands support the full grammar '<'padding-top'>'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("padding-block-start", "0", "0px");
|
||||
test_valid_value("padding-block-start", "calc(20% + 10px)");
|
||||
test_valid_value("padding-block-end", "10px");
|
||||
test_valid_value("padding-inline-start", "20%");
|
||||
test_valid_value("padding-inline-end", "calc(2em + 2ex)");
|
||||
|
||||
test_valid_value("padding-block", "10px");
|
||||
test_valid_value("padding-block", "10px 20%");
|
||||
test_valid_value("padding-inline", "20%");
|
||||
test_valid_value("padding-inline", "20% calc(20% + 10px)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue