Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'

This commit is contained in:
WPT Sync Bot 2021-09-07 11:16:33 +00:00 committed by cybai
parent 35e95f55a1
commit 58e8ee674b
9438 changed files with 266112 additions and 106976 deletions

View file

@ -1,28 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: getComputedStyle().insetAfter</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-after">
<meta name="assert" content="inset-after lengths are made absolute.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<style>
#target {
font-size: 40px;
}
</style>
<script>
test_computed_value("inset-after", "auto");
test_computed_value("inset-after", "calc(10px + 0.5em)", "30px");
test_computed_value("inset-after", "calc(10px - 0.5em)", "-10px");
test_computed_value("inset-after", "-40%");
test_computed_value("inset-after", "calc(50% + 60px)");
</script>
</body>
</html>

View file

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: parsing inset-after with invalid values</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-after">
<meta name="assert" content="inset-after supports only the grammar 'auto | <length-percentage>'.">
<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("inset-after", "min-content");
test_invalid_value("inset-after", "60");
test_invalid_value("inset-after", "10px 20%");
</script>
</body>
</html>

View file

@ -1,21 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: parsing inset-after with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-after">
<meta name="assert" content="inset-after supports the full grammar 'auto | <length-percentage>'.">
<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("inset-after", "auto");
test_valid_value("inset-after", "-10px");
test_valid_value("inset-after", "-20%");
test_valid_value("inset-after", "calc(2em + 3ex)");
</script>
</body>
</html>

View file

@ -1,28 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: getComputedStyle().insetBefore</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-before">
<meta name="assert" content="inset-before lengths are made absolute.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<style>
#target {
font-size: 40px;
}
</style>
<script>
test_computed_value("inset-before", "auto");
test_computed_value("inset-before", "calc(10px + 0.5em)", "30px");
test_computed_value("inset-before", "calc(10px - 0.5em)", "-10px");
test_computed_value("inset-before", "-40%");
test_computed_value("inset-before", "calc(50% + 60px)");
</script>
</body>
</html>

View file

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: parsing inset-before with invalid values</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-before">
<meta name="assert" content="inset-before supports only the grammar 'auto | <length-percentage>'.">
<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("inset-before", "min-content");
test_invalid_value("inset-before", "60");
test_invalid_value("inset-before", "10px 20%");
</script>
</body>
</html>

View file

@ -1,21 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: parsing inset-before with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-before">
<meta name="assert" content="inset-before supports the full grammar 'auto | <length-percentage>'.">
<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("inset-before", "auto");
test_valid_value("inset-before", "-10px");
test_valid_value("inset-before", "-20%");
test_valid_value("inset-before", "calc(2em + 3ex)");
</script>
</body>
</html>

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module: getComputedStyle() for inset properties</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#insets">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<style>
#target {
font-size: 40px;
}
</style>
<script>
const values = [
// [input, serialized(optional)]
["auto"],
["calc(10px + 0.5em)", "30px"],
["calc(10px - 0.5em)", "-10px"],
["-40%"],
["calc(50% + 60px)"]
];
function test_inset_longhand(longhand_property) {
for (let value of values) {
if (value[1] === undefined)
test_computed_value(longhand_property, value[0]);
else
test_computed_value(longhand_property, value[0], value[1]);
}
}
test_inset_longhand("inset-block-start");
test_inset_longhand("inset-block-end");
test_inset_longhand("inset-inline-start");
test_inset_longhand("inset-inline-end");
</script>
</body>
</html>

View file

@ -1,28 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: getComputedStyle().insetEnd</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-end">
<meta name="assert" content="inset-end lengths are made absolute.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<style>
#target {
font-size: 40px;
}
</style>
<script>
test_computed_value("inset-end", "auto");
test_computed_value("inset-end", "calc(10px + 0.5em)", "30px");
test_computed_value("inset-end", "calc(10px - 0.5em)", "-10px");
test_computed_value("inset-end", "-40%");
test_computed_value("inset-end", "calc(50% + 60px)");
</script>
</body>
</html>

View file

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: parsing inset-end with invalid values</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-end">
<meta name="assert" content="inset-end supports only the grammar 'auto | <length-percentage>'.">
<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("inset-end", "min-content");
test_invalid_value("inset-end", "60");
test_invalid_value("inset-end", "10px 20%");
</script>
</body>
</html>

View file

@ -1,21 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: parsing inset-end with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-end">
<meta name="assert" content="inset-end supports the full grammar 'auto | <length-percentage>'.">
<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("inset-end", "auto");
test_valid_value("inset-end", "-10px");
test_valid_value("inset-end", "-20%");
test_valid_value("inset-end", "calc(2em + 3ex)");
</script>
</body>
</html>

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module: parsing inset with invalid values</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#insets">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
const single_values = [
"0deg",
"calc(20deg)",
"10"
];
const double_values = [
"inherit auto",
"inherit inherit"
];
function test_inset_longhand(longhand_property) {
for (let value of single_values)
test_invalid_value(longhand_property, value);
}
function test_inset_shorthand(shorthand_property) {
for (let value of single_values)
test_invalid_value(shorthand_property, value);
for (let value of double_values)
test_invalid_value(shorthand_property, value);
}
test_inset_longhand("inset-block-start");
test_inset_longhand("inset-block-end");
test_inset_longhand("inset-inline-start");
test_inset_longhand("inset-inline-end");
test_inset_shorthand("inset-block");
test_inset_shorthand("inset-inline");
</script>
</body>
</html>

View file

@ -1,28 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: getComputedStyle().insetStart</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-start">
<meta name="assert" content="inset-start lengths are made absolute.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<style>
#target {
font-size: 40px;
}
</style>
<script>
test_computed_value("inset-start", "auto");
test_computed_value("inset-start", "calc(10px + 0.5em)", "30px");
test_computed_value("inset-start", "calc(10px - 0.5em)", "-10px");
test_computed_value("inset-start", "-40%");
test_computed_value("inset-start", "calc(50% + 60px)");
</script>
</body>
</html>

View file

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: parsing inset-start with invalid values</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-start">
<meta name="assert" content="inset-start supports only the grammar 'auto | <length-percentage>'.">
<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("inset-start", "min-content");
test_invalid_value("inset-start", "60");
test_invalid_value("inset-start", "10px 20%");
</script>
</body>
</html>

View file

@ -1,21 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module Level 3: parsing inset-start with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#propdef-inset-start">
<meta name="assert" content="inset-start supports the full grammar 'auto | <length-percentage>'.">
<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("inset-start", "auto");
test_valid_value("inset-start", "-10px");
test_valid_value("inset-start", "-20%");
test_valid_value("inset-start", "calc(2em + 3ex)");
</script>
</body>
</html>

View file

@ -0,0 +1,62 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Positioned Layout Module: parsing inset with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#insets">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
const single_values = [
// [input, serialized(optional)]
["0", "0px"],
["auto"],
["10%"],
["1rem"],
["-10px"],
["-20%"],
["calc(2em + 3ex)"],
];
const double_values = [
// [input, serialized(optional)]
["auto auto", "auto"],
["100px 100px", "100px"],
["10% -5px"],
["1rem calc(0px)"]
];
function test_inset_longhand(longhand_property) {
for (let value of single_values) {
if (value[1] === undefined)
test_valid_value(longhand_property, value[0]);
else
test_valid_value(longhand_property, value[0], value[1]);
}
}
function test_inset_shorthand(shorthand_property) {
for (let value of single_values) {
if (value[1] === undefined)
test_valid_value(shorthand_property, value[0]);
else
test_valid_value(shorthand_property, value[0], value[1]);
}
for (let value of double_values) {
if (value[1] === undefined)
test_valid_value(shorthand_property, value[0]);
else
test_valid_value(shorthand_property, value[0], value[1]);
}
}
test_inset_longhand("inset-block-start");
test_inset_longhand("inset-block-end");
test_inset_longhand("inset-inline-start");
test_inset_longhand("inset-inline-end");
test_inset_shorthand("inset-block");
test_inset_shorthand("inset-inline");
</script>
</body>
</html>