Update web-platform-tests to revision 74efe51f1faaa2bf3ff91c10f05a4ad9615a1553

This commit is contained in:
WPT Sync Bot 2019-12-31 08:22:52 +00:00
parent 267ce462d8
commit dacb7e9002
49 changed files with 2889 additions and 59 deletions

View file

@ -0,0 +1,53 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>letter-spacing composition</title>
<link rel="help" href="https://drafts.csswg.org/css-text-3/#letter-spacing-property">
<meta name="test" content="letter-spacing supports animation by computed value type">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<body>
<script src="../interpolation/resources/interpolation-test.js"></script>
<script>
test_composition({
property: 'letter-spacing',
underlying: '50px',
addFrom: '100px',
addTo: '200px',
}, [
{at: -0.3, expect: '120px'},
{at: 0, expect: '150px'},
{at: 0.5, expect: '200px'},
{at: 1, expect: '250px'},
{at: 1.5, expect: '300px'},
]);
test_composition({
property: 'letter-spacing',
underlying: '100px',
addFrom: '10px',
addTo: '2px',
}, [
{at: -0.5, expect: '114px'},
{at: 0, expect: '110px'},
{at: 0.5, expect: '106px'},
{at: 1, expect: '102px'},
{at: 1.5, expect: '98px'},
]);
test_composition({
property: 'letter-spacing',
underlying: '50px',
addFrom: '100px',
replaceTo: '200px',
}, [
{at: -0.3, expect: '135px'},
{at: 0, expect: '150px'},
{at: 0.5, expect: '175px'},
{at: 1, expect: '200px'},
{at: 1.5, expect: '225px'},
]);
</script>
</body>

View file

@ -0,0 +1,84 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>letter-spacing composition</title>
<link rel="help" href="https://drafts.csswg.org/css-text-3/#text-indent-property">
<meta name="test" content="text-indent supports animation by computed value type">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<body></body>
<script>
test_composition({
property: 'text-indent',
underlying: '100%',
addFrom: '50px',
addTo: '150px',
}, [
{at: -0.3, expect: 'calc(100% + 20px)'},
{at: 0, expect: 'calc(100% + 50px)'},
{at: 0.3, expect: 'calc(100% + 80px)'},
{at: 0.6, expect: 'calc(100% + 110px)'},
{at: 1, expect: 'calc(100% + 150px)'},
{at: 1.5, expect: 'calc(100% + 200px)'},
]);
test_composition({
property: 'text-indent',
underlying: '250px',
addFrom: '50px',
replaceTo: '100px',
}, [
{at: -0.3, expect: '360px'},
{at: 0, expect: '300px'},
{at: 0.3, expect: '240px'},
{at: 0.6, expect: '180px'},
{at: 1, expect: '100px'},
{at: 1.5, expect: '0px'},
]);
test_composition({
property: 'text-indent',
underlying: '50%',
replaceFrom: '-100%',
addTo: '50%',
}, [
{at: -0.3, expect: '-160%'},
{at: 0, expect: '-100%'},
{at: 0.3, expect: '-40%'},
{at: 0.5, expect: '0%'},
{at: 0.6, expect: '20%'},
{at: 1, expect: '100%'},
{at: 1.5, expect: '200%'},
]);
test_composition({
property: 'text-indent',
underlying: '250px',
addFrom: '50px each-line hanging',
replaceTo: '150px hanging each-line',
}, [
{at: -0.3, expect: '20px hanging each-line'},
{at: 0, expect: '50px hanging each-line'},
{at: 0.3, expect: '80px hanging each-line'},
{at: 0.6, expect: '110px hanging each-line'},
{at: 1, expect: '150px hanging each-line'},
{at: 1.5, expect: '200px hanging each-line'},
]);
test_composition({
property: 'text-indent',
underlying: '250px each-line',
addFrom: '50px each-line',
replaceTo: '150px hanging',
}, [
{at: -0.3, expect: '300px each-line'},
{at: 0, expect: '300px each-line'},
{at: 0.3, expect: '300px each-line'},
{at: 0.6, expect: '150px hanging'},
{at: 1, expect: '150px hanging'},
{at: 1.5, expect: '150px hanging'},
]);
</script>
</body>

View file

@ -0,0 +1,52 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>word-spacing composition</title>
<link rel="help" href="https://drafts.csswg.org/css-text-3/#word-spacing-property">
<meta name="test" content="word-spacing supports animation by computed value type">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<body>
<script>
test_composition({
property: 'word-spacing',
underlying: '50px',
addFrom: '100px',
addTo: '200px',
}, [
{at: -0.3, expect: '120px'},
{at: 0, expect: '150px'},
{at: 0.5, expect: '200px'},
{at: 1, expect: '250px'},
{at: 1.5, expect: '300px'},
]);
test_composition({
property: 'word-spacing',
underlying: '100px',
addFrom: '10px',
addTo: '2px',
}, [
{at: -0.5, expect: '114px'},
{at: 0, expect: '110px'},
{at: 0.5, expect: '106px'},
{at: 1, expect: '102px'},
{at: 1.5, expect: '98px'},
]);
test_composition({
property: 'word-spacing',
underlying: '50px',
addFrom: '100px',
replaceTo: '200px',
}, [
{at: -0.3, expect: '135px'},
{at: 0, expect: '150px'},
{at: 0.5, expect: '175px'},
{at: 1, expect: '200px'},
{at: 1.5, expect: '225px'},
]);
</script>
</body>