Update web-platform-tests to revision f283c90ff58ce6b758525ba9ef8f7885d466730f

This commit is contained in:
WPT Sync Bot 2019-08-27 10:46:25 +00:00
parent 245ce017e3
commit 3a48586f85
192 changed files with 2963 additions and 170 deletions

View file

@ -0,0 +1,106 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>caret-color interpolation</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#propdef-caret-color">
<meta name="assert" content="caret-color supports animation by computed value">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
.parent {
caret-color: blue;
}
.target {
display: inline-block;
font-size: 60pt;
caret-color: yellow;
}
.expected {
margin-right: 15px;
}
</style>
<body contenteditable>
<template id="target-template">T</template>
</body>
<script>
test_interpolation({
property: 'caret-color',
from: neutralKeyframe,
to: 'green',
}, [
{at: -0.3, expect: 'rgb(255, 255, 0)'},
{at: 0, expect: 'rgb(255, 255, 0)'},
{at: 0.3, expect: 'rgb(179, 217, 0)'},
{at: 0.6, expect: 'rgb(102, 179, 0)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 65, 0)'},
]);
test_no_interpolation({
property: 'caret-color',
from: 'initial',
to: 'green',
});
test_no_interpolation({
property: 'caret-color',
from: 'auto',
to: 'green',
});
test_interpolation({
property: 'caret-color',
from: 'currentColor',
to: 'green',
}, [
{at: -0.3, expect: 'rgb(0, 0, 0)'},
{at: 0, expect: 'rgb(0, 0, 0)'},
{at: 0.3, expect: 'rgb(0, 38, 0)'},
{at: 0.6, expect: 'rgb(0, 77, 0)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 192, 0)'},
]);
test_interpolation({
property: 'caret-color',
from: 'inherit',
to: 'green',
}, [
{at: -0.3, expect: 'rgb(0, 0, 255)'},
{at: 0, expect: 'rgb(0, 0, 255)'},
{at: 0.3, expect: 'rgb(0, 38, 179)'},
{at: 0.6, expect: 'rgb(0, 77, 102)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 192, 0)'},
]);
test_interpolation({
property: 'caret-color',
from: 'unset',
to: 'green',
}, [
{at: -0.3, expect: 'rgb(0, 0, 255)'},
{at: 0, expect: 'rgb(0, 0, 255)'},
{at: 0.3, expect: 'rgb(0, 38, 179)'},
{at: 0.6, expect: 'rgb(0, 77, 102)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 192, 0)'},
]);
test_interpolation({
property: 'caret-color',
from: 'black',
to: 'orange',
}, [
{at: -0.3, expect: 'rgb(0, 0, 0)'},
{at: 0, expect: 'rgb(0, 0, 0)'},
{at: 0.3, expect: 'rgb(77, 50, 0)'},
{at: 0.6, expect: 'rgb(153, 99, 0)'},
{at: 1, expect: 'rgb(255, 165, 0)'},
{at: 1.5, expect: 'rgb(255, 248, 0)'},
]);
</script>

View file

@ -0,0 +1,96 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>outline-color interpolation</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-color">
<meta name="assert" content="outline-color supports animation by computed value">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
.parent {
outline-color: yellow;
}
.target {
width: 50px;
height: 50px;
background-color: black;
display: inline-block;
outline: 12px solid white;
margin: 12px 12px;
outline-color: blue;
}
.expected {
background-color: lime;
}
</style>
<body></body>
<script>
test_interpolation({
property: 'outline-color',
from: neutralKeyframe,
to: 'green',
}, [
{at: -0.3, expect: 'rgb(0, 0, 255)'},
{at: 0, expect: 'rgb(0, 0, 255)'},
{at: 0.3, expect: 'rgb(0, 38, 179)'},
{at: 0.6, expect: 'rgb(0, 77, 102)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 192, 0)'},
]);
test_interpolation({
property: 'outline-color',
from: 'initial',
to: 'green',
}, [
{at: -0.3, expect: 'rgb(0, 0, 0)'},
{at: 0, expect: 'rgb(0, 0, 0)'},
{at: 0.3, expect: 'rgb(0, 38, 0)'},
{at: 0.6, expect: 'rgb(0, 77, 0)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 192, 0)'},
]);
test_interpolation({
property: 'outline-color',
from: 'inherit',
to: 'green',
}, [
{at: -0.3, expect: 'rgb(255, 255, 0)'},
{at: 0, expect: 'rgb(255, 255, 0)'},
{at: 0.3, expect: 'rgb(179, 217, 0)'},
{at: 0.6, expect: 'rgb(102, 179, 0)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 65, 0)'},
]);
test_interpolation({
property: 'outline-color',
from: 'unset',
to: 'green',
}, [
{at: -0.3, expect: 'rgb(0, 0, 0)'},
{at: 0, expect: 'rgb(0, 0, 0)'},
{at: 0.3, expect: 'rgb(0, 38, 0)'},
{at: 0.6, expect: 'rgb(0, 77, 0)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 192, 0)'},
]);
test_interpolation({
property: 'outline-color',
from: 'white',
to: 'orange'
}, [
{at: -0.3, expect: 'white'},
{at: 0, expect: 'white'},
{at: 0.3, expect: 'rgb(255, 228, 179)'},
{at: 0.6, expect: 'rgb(255, 201, 102)'},
{at: 1, expect: 'orange'},
{at: 1.5, expect: 'rgb(255, 120, 0)'},
]);
</script>

View file

@ -0,0 +1,98 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>outline-offset interpolation</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-offset">
<meta name="assert" content="outline-offset supports animation by computed value">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
.parent {
outline: solid 0px;
outline-offset: 30px;
}
.target {
width: 50px;
height: 50px;
background-color: black;
display: inline-block;
margin: 40px 0px 0px 40px;
outline: 4px solid orange;
outline-offset: 10px;
}
.expected {
background-color: green;
margin-right: 18px;
}
</style>
<body></body>
<script>
test_interpolation({
property: 'outline-offset',
from: neutralKeyframe,
to: '20px',
}, [
{at: -0.3, expect: '7px'},
{at: 0, expect: '10px'},
{at: 0.3, expect: '13px'},
{at: 0.6, expect: '16px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '25px'},
]);
test_interpolation({
property: 'outline-offset',
from: 'initial',
to: '20px',
}, [
{at: -0.3, expect: '-6px'},
{at: 0, expect: '0px'},
{at: 0.3, expect: '6px'},
{at: 0.6, expect: '12px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '30px'},
]);
test_interpolation({
property: 'outline-offset',
from: 'inherit',
to: '20px',
}, [
{at: -0.3, expect: '33px'},
{at: 0, expect: '30px'},
{at: 0.3, expect: '27px'},
{at: 0.6, expect: '24px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '15px'},
]);
test_interpolation({
property: 'outline-offset',
from: 'unset',
to: '20px',
}, [
{at: -0.3, expect: '-6px'},
{at: 0, expect: '0px'},
{at: 0.3, expect: '6px'},
{at: 0.6, expect: '12px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '30px'},
]);
test_interpolation({
property: 'outline-offset',
from: '-5px',
to: '5px',
}, [
{at: -0.3, expect: '-8px'},
{at: 0, expect: '-5px'},
{at: 0.3, expect: '-2px'},
{at: 0.6, expect: '1px'},
{at: 1, expect: '5px'},
{at: 1.5, expect: '10px'},
]);
</script>

View file

@ -0,0 +1,120 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>outline-width interpolation</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-width">
<meta name="assert" content="outline-width supports animation by computed value">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
.parent {
outline: solid transparent;
outline-width: 30px;
}
.target {
width: 50px;
height: 50px;
background-color: black;
display: inline-block;
margin: 18px;
outline: solid orange;
outline-width: 10px;
opacity: 0.5;
}
.expected {
background-color: green;
}
</style>
<body></body>
<script>
// NOTE: The below tests make assumptions about the values of medium (for unset
// and initial) and thick, namely that:
// * medium=3px
// * thick=3px
//
// A better version of these tests would dynamically generate the expected values
// by querying the computed style from the UA.
test_interpolation({
property: 'outline-width',
from: neutralKeyframe,
to: '20px',
}, [
{at: -0.3, expect: '7px'},
{at: 0, expect: '10px'},
{at: 0.3, expect: '13px'},
{at: 0.6, expect: '16px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '25px'},
]);
test_interpolation({
property: 'outline-width',
from: 'initial',
to: '20px',
}, [
{at: -0.3, expect: '0px'},
{at: 0, expect: '3px'},
{at: 0.3, expect: '8px'},
{at: 0.6, expect: '13px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '28px'},
]);
test_interpolation({
property: 'outline-width',
from: 'inherit',
to: '20px',
}, [
{at: -0.3, expect: '33px'},
{at: 0, expect: '30px'},
{at: 0.3, expect: '27px'},
{at: 0.6, expect: '24px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '15px'},
]);
test_interpolation({
property: 'outline-width',
from: 'unset',
to: '20px',
}, [
{at: -0.3, expect: '0px'},
{at: 0, expect: '3px'},
{at: 0.3, expect: '8px'},
{at: 0.6, expect: '13px'},
{at: 1, expect: '20px'},
{at: 1.5, expect: '28px'},
]);
test_interpolation({
property: 'outline-width',
from: '0px',
to: '10px',
}, [
{at: -0.3, expect: '0px'}, // CSS outline-width can't be negative.
{at: 0, expect: '0px'},
{at: 0.3, expect: '3px'},
{at: 0.6, expect: '6px'},
{at: 1, expect: '10px'},
{at: 1.5, expect: '15px'}
]);
test_interpolation({
property: 'outline-width',
from: 'thick',
to: '15px',
}, [
{at: -2, expect: '0px'}, // CSS outline-width can't be negative.
{at: -0.3, expect: '2px'},
{at: 0, expect: '5px'},
{at: 0.3, expect: '8px'},
{at: 0.6, expect: '11px'},
{at: 1, expect: '15px'},
{at: 1.5, expect: '20px'}
]);
</script>