Update web-platform-tests to revision f0cb9071aea5ce5b641fcba5f362a0796bdc70bc

This commit is contained in:
WPT Sync Bot 2019-11-23 08:37:37 +00:00
parent 0d549e8146
commit 7289e837fd
558 changed files with 8627 additions and 6619 deletions

View file

@ -0,0 +1,98 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>vertical-align interpolation</title>
<link rel="help" href="https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align">
<meta name="assert" content="vertical-align supports animation">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
.parent {
vertical-align: 100px;
}
.target {
width: 100px;
height: 100px;
background-color: black;
display: inline-block;
vertical-align: 10px;
}
.expected {
background-color: green;
}
</style>
<body>
<script>
test_interpolation({
property: 'vertical-align',
from: neutralKeyframe,
to: '40px',
}, [
{at: -0.5, expect: '-5px'},
{at: 0, expect: '10px'},
{at: 0.3, expect: '19px'},
{at: 0.6, expect: '28px'},
{at: 1, expect: '40px'},
{at: 1.5, expect: '55px'},
]);
test_no_interpolation({
property: 'vertical-align',
from: 'initial',
to: '40px',
});
test_interpolation({
property: 'vertical-align',
from: 'inherit',
to: '40px',
}, [
{at: -0.5, expect: '130px'},
{at: 0, expect: '100px'},
{at: 0.3, expect: '82px'},
{at: 0.6, expect: '64px'},
{at: 1, expect: '40px'},
{at: 1.5, expect: '10px'},
]);
test_no_interpolation({
property: 'vertical-align',
from: 'unset',
to: '40px',
});
test_interpolation({
property: 'vertical-align',
from: '0px',
to: '100px'
}, [
{at: -0.5, expect: '-50px'},
{at: 0, expect: '0px'},
{at: 0.3, expect: '30px'},
{at: 0.6, expect: '60px'},
{at: 1, expect: '100px'},
{at: 1.5, expect: '150px'}
]);
test_interpolation({
property: 'vertical-align',
from: '40px',
to: '40%'
}, [
{at: -0.5, expect: 'calc(60px - 20%)'},
{at: 0, expect: 'calc(40px + 0%)'},
{at: 0.3, expect: 'calc(28px + 12%)'},
{at: 1, expect: 'calc(0px + 40%)'},
{at: 1.5, expect: 'calc(-20px + 60%)'}
]);
test_no_interpolation({
property: 'vertical-align',
from: 'super',
to: '40%'
});
</script>
</body>

View file

@ -0,0 +1,130 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>z-index interpolation</title>
<link rel="help" href="https://www.w3.org/TR/CSS2/visuren.html#z-index">
<meta name="assert" content="z-index supports animation">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
body {
margin-top: 20px;
}
.layer-reference {
position: fixed;
top: 0px;
height: 100vh;
width: 50px;
background-color: rgba(255, 255, 255, 0.75);
font-family: sans-serif;
text-align: center;
padding-top: 5px;
border: 1px solid;
}
.parent {
z-index: 15;
}
.target {
position: relative;
width: 350px;
height: 10px;
z-index: -2;
}
.actual {
background-color: black;
}
.expected {
background-color: green;
}
</style>
<body></body>
<script>
test_interpolation({
property: 'z-index',
from: neutralKeyframe,
to: '5',
}, [
{at: -0.3, expect: '-4'},
{at: 0, expect: '-2'},
{at: 0.3, expect: '0'},
{at: 0.6, expect: '2'},
{at: 1, expect: '5'},
{at: 1.5, expect: '9'},
]);
test_no_interpolation({
property: 'z-index',
from: 'initial',
to: '5',
});
// We fail to inherit correctly due to style overadjustment: crbug.com/375982
test_interpolation({
property: 'z-index',
from: 'inherit',
to: '5',
}, [
{at: -0.3, expect: '18'},
{at: 0, expect: '15'},
{at: 0.3, expect: '12'},
{at: 0.6, expect: '9'},
{at: 1, expect: '5'},
{at: 1.5, expect: '0'},
]);
test_no_interpolation({
property: 'z-index',
from: 'unset',
to: '5',
});
test_interpolation({
property: 'z-index',
from: '-5',
to: '5'
}, [
{at: -0.3, expect: '-8'},
{at: 0, expect: '-5'},
{at: 0.3, expect: '-2'},
{at: 0.6, expect: '1'},
{at: 1, expect: '5'},
{at: 1.5, expect: '10'},
]);
test_interpolation({
property: 'z-index',
from: '2',
to: '4'
}, [
{at: -0.3, expect: '1'},
{at: 0, expect: '2'},
{at: 0.3, expect: '3'},
{at: 0.6, expect: '3'},
{at: 1, expect: '4'},
{at: 1.5, expect: '5'},
]);
test_interpolation({
property: 'z-index',
from: '-2',
to: '-4'
}, [
{at: -0.3, expect: '-1'},
{at: 0, expect: '-2'},
{at: 0.1, expect: '-2'},
{at: 0.3, expect: '-3'},
{at: 0.6, expect: '-3'},
{at: 1, expect: '-4'},
{at: 1.5, expect: '-5'},
]);
test_no_interpolation({
property: 'z-index',
from: 'auto',
to: '10',
});
</script>