Update web-platform-tests to revision 2660fc486f7027c913863d48a8843942f0c0365e

This commit is contained in:
WPT Sync Bot 2019-09-12 10:30:30 +00:00
parent 96de31b463
commit c413a1139e
455 changed files with 8535 additions and 2067 deletions

View file

@ -45,18 +45,20 @@ test_interpolation({
{at: 1.25, expect: '90px 90px, 90px 90px, 90px 90px, 90px 90px'},
]);
// background-position's initial value is 0% 0%, and calcs involving percentages
// are never resolved by the calc spec (even when the percentage is 0%).
test_interpolation({
property: 'background-position',
from: 'initial',
to: '80px 80px, 80px 80px, 80px 80px, 80px 80px',
}, [
{at: -0.25, expect: '-20px -20px, -20px -20px, -20px -20px, -20px -20px'},
{at: 0, expect: ' 0% 0% , 0% 0% , 0% 0% , 0% 0% '}, // TODO(alancutter): Should these be 0px?
{at: 0.25, expect: ' 20px 20px, 20px 20px, 20px 20px, 20px 20px'},
{at: 0.5, expect: ' 40px 40px, 40px 40px, 40px 40px, 40px 40px'},
{at: 0.75, expect: ' 60px 60px, 60px 60px, 60px 60px, 60px 60px'},
{at: 1, expect: ' 80px 80px, 80px 80px, 80px 80px, 80px 80px'},
{at: 1.25, expect: '100px 100px, 100px 100px, 100px 100px, 100px 100px'},
{at: -0.25, expect: 'calc(0% - 20px) calc(0% - 20px), calc(0% - 20px) calc(0% - 20px), calc(0% - 20px) calc(0% - 20px), calc(0% - 20px) calc(0% - 20px)'},
{at: 0, expect: '0% 0%, 0% 0%, 0% 0%, 0% 0%'},
{at: 0.25, expect: 'calc(0% + 20px) calc(0% + 20px), calc(0% + 20px) calc(0% + 20px), calc(0% + 20px) calc(0% + 20px), calc(0% + 20px) calc(0% + 20px)'},
{at: 0.5, expect: 'calc(0% + 40px) calc(0% + 40px), calc(0% + 40px) calc(0% + 40px), calc(0% + 40px) calc(0% + 40px), calc(0% + 40px) calc(0% + 40px)'},
{at: 0.75, expect: 'calc(0% + 60px) calc(0% + 60px), calc(0% + 60px) calc(0% + 60px), calc(0% + 60px) calc(0% + 60px), calc(0% + 60px) calc(0% + 60px)'},
{at: 1, expect: 'calc(0% + 80px) calc(0% + 80px), calc(0% + 80px) calc(0% + 80px), calc(0% + 80px) calc(0% + 80px), calc(0% + 80px) calc(0% + 80px)'},
{at: 1.25, expect: 'calc(0% + 100px) calc(0% + 100px), calc(0% + 100px) calc(0% + 100px), calc(0% + 100px) calc(0% + 100px), calc(0% + 100px) calc(0% + 100px)'},
]);
test_interpolation({
@ -73,18 +75,19 @@ test_interpolation({
{at: 1.25, expect: '85px 85px, 85px 85px, 85px 85px, 85px 85px'},
]);
// background-position is not inherited, so 'unset' is equivalent to initial.
test_interpolation({
property: 'background-position',
from: 'unset',
to: '80px 80px, 80px 80px, 80px 80px, 80px 80px',
}, [
{at: -0.25, expect: '-20px -20px, -20px -20px, -20px -20px, -20px -20px'},
{at: 0, expect: ' 0% 0% , 0% 0% , 0% 0% , 0% 0% '},
{at: 0.25, expect: ' 20px 20px, 20px 20px, 20px 20px, 20px 20px'},
{at: 0.5, expect: ' 40px 40px, 40px 40px, 40px 40px, 40px 40px'},
{at: 0.75, expect: ' 60px 60px, 60px 60px, 60px 60px, 60px 60px'},
{at: 1, expect: ' 80px 80px, 80px 80px, 80px 80px, 80px 80px'},
{at: 1.25, expect: '100px 100px, 100px 100px, 100px 100px, 100px 100px'},
{at: -0.25, expect: 'calc(0% - 20px) calc(0% - 20px), calc(0% - 20px) calc(0% - 20px), calc(0% - 20px) calc(0% - 20px), calc(0% - 20px) calc(0% - 20px)'},
{at: 0, expect: '0% 0%, 0% 0%, 0% 0%, 0% 0%'},
{at: 0.25, expect: 'calc(0% + 20px) calc(0% + 20px), calc(0% + 20px) calc(0% + 20px), calc(0% + 20px) calc(0% + 20px), calc(0% + 20px) calc(0% + 20px)'},
{at: 0.5, expect: 'calc(0% + 40px) calc(0% + 40px), calc(0% + 40px) calc(0% + 40px), calc(0% + 40px) calc(0% + 40px), calc(0% + 40px) calc(0% + 40px)'},
{at: 0.75, expect: 'calc(0% + 60px) calc(0% + 60px), calc(0% + 60px) calc(0% + 60px), calc(0% + 60px) calc(0% + 60px), calc(0% + 60px) calc(0% + 60px)'},
{at: 1, expect: 'calc(0% + 80px) calc(0% + 80px), calc(0% + 80px) calc(0% + 80px), calc(0% + 80px) calc(0% + 80px), calc(0% + 80px) calc(0% + 80px)'},
{at: 1.25, expect: 'calc(0% + 100px) calc(0% + 100px), calc(0% + 100px) calc(0% + 100px), calc(0% + 100px) calc(0% + 100px), calc(0% + 100px) calc(0% + 100px)'},
]);
// Test equal number of position values as background images.

View file

@ -12,7 +12,11 @@
</head>
<body>
<script>
// <bg-layer> does not allow a <color>.
test_invalid_value("background", "red, green");
// A `/ <bg-size>` is only allowed directly after a <bg-position>.
test_invalid_value("background", "black 0 url(https://example.invalid/) / cover");
</script>
</body>
</html>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Backgrounds and Borders Module Level 3: getComputedStyle().borderRadius</title>
<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#border-radius">
<meta name="assert" content="Computed value has computed length-percentage values.">
<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("border-radius", "1px");
test_computed_value("border-radius", "1px 2% 3px 4%");
test_computed_value("border-radius", "5em / 1px 2% 3px 4%", "200px / 1px 2% 3px 4%");
test_computed_value("border-radius", "1px 2% 3px 4% / 5em", "1px 2% 3px 4% / 200px");
test_computed_value("border-radius", "1px 1px 1px 2% / 1px 2% 1px 2%", "1px 1px 1px 2% / 1px 2%");
test_computed_value("border-radius", "1px 1px 1px 1px / 1px 1px 2% 1px", "1px / 1px 1px 2%");
test_computed_value("border-radius", "1px 1px 2% 2%");
test_computed_value("border-radius", "1px 2% 1px 1px");
test_computed_value("border-radius", "1px 2% 2% 2% / 1px 2% 3px 2%", "1px 2% 2% / 1px 2% 3px");
test_computed_value("border-top-left-radius", "calc(-0.5em + 10px)", "0px");
test_computed_value("border-top-right-radius", "20%");
test_computed_value("border-bottom-right-radius", "calc(0.5em + 10px) 40%", "30px 40%");
test_computed_value("border-bottom-left-radius", "50% 60px");
</script>
</body>
</html>

View file

@ -3,7 +3,6 @@
<head>
<meta charset="utf-8">
<title>CSS Backgrounds and Borders Module Level 3: parsing border-radius with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#border-radius">
<meta name="assert" content="border-radius supports only the grammar '<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?'.">
<script src="/resources/testharness.js"></script>
@ -12,12 +11,14 @@
</head>
<body>
<script>
test_invalid_value("border-radius", "auto");
test_invalid_value("border-radius", "none");
test_invalid_value("border-radius", "1px 2px 3px 4px 5px");
test_invalid_value("border-radius", "-1px");
test_invalid_value("border-radius", "1px -2px");
test_invalid_value("border-radius", "1em /");
test_invalid_value("border-radius", "1px / 2px / 3px");
test_invalid_value("border-radius", "4 / 5");
test_invalid_value("border-radius", "5em 1px 5em 2% 5em 3px 5em 4%");
test_invalid_value("border-radius", "1px 5em 2% 5em 3px 5em 4% 5em");

View file

@ -3,7 +3,6 @@
<head>
<meta charset="utf-8">
<title>CSS Backgrounds and Borders Module Level 3: parsing border-radius with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#border-radius">
<meta name="assert" content="border-radius supports the full grammar '<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?'.">
<script src="/resources/testharness.js"></script>
@ -14,8 +13,14 @@
<script>
test_valid_value("border-radius", "1px");
test_valid_value("border-radius", "1px 2% 3px 4%");
test_valid_value("border-radius", "5em / 1px 2% 3px 4%"); // Blink and Webkit fail by serializing as "5em 1px 5em 2% 5em 3px 5em 4%"
test_valid_value("border-radius", "1px 2% 3px 4% / 5em"); // Blink and Webkit fail by serializing as "1px 5em 2% 5em 3px 5em 4% 5em"
test_valid_value("border-radius", "5em / 1px 2% 3px 4%");
test_valid_value("border-radius", "1px 2% 3px 4% / 5em");
test_valid_value("border-radius", "1px 1px 1px 2% / 1px 2% 1px 2%", "1px 1px 1px 2% / 1px 2%");
test_valid_value("border-radius", "1px 1px 1px 1px / 1px 1px 2% 1px", "1px / 1px 1px 2%");
test_valid_value("border-radius", "1px 1px 2% 2%");
test_valid_value("border-radius", "1px 2% 1px 1px");
test_valid_value("border-radius", "1px 2% 2% 2% / 1px 2% 3px 2%", "1px 2% 2% / 1px 2% 3px");
test_valid_value("border-top-left-radius", "10px");
test_valid_value("border-top-right-radius", "20%");