mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 05:39:41 +02:00
Automatic update from web-platform-tests Port background-position-x(y)-interpolation to wpt This CL ports two interpolation tests to wpt. Bug: 900581 Change-Id: Ib0724e6854b0bf159bd9054730dd7bfb31fd9d10 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810196 Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Xida Chen <xidachen@chromium.org> Cr-Commit-Position: refs/heads/master@{#702289} -- wpt-commits: 2612d6db427a6cf148ade7bd2ceff3444f165877 wpt-pr: 19475
78 lines
2 KiB
HTML
78 lines
2 KiB
HTML
<!DOCTYPE html>
|
|
<meta charset="UTF-8">
|
|
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#background-position">
|
|
<meta name="test" content="background-position-y supports animation">
|
|
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/css/support/interpolation-testcommon.js"></script>
|
|
|
|
<style>
|
|
.parent {
|
|
background-position-y: 60px;
|
|
}
|
|
|
|
.target {
|
|
background-position-y: 40px;
|
|
}
|
|
</style>
|
|
|
|
<body>
|
|
<script>
|
|
test_interpolation({
|
|
property: 'background-position-y',
|
|
from: neutralKeyframe,
|
|
to: '80px',
|
|
}, [
|
|
{at: -0.25, expect: '30px'},
|
|
{at: 0, expect: '40px'},
|
|
{at: 0.25, expect: '50px'},
|
|
{at: 0.5, expect: '60px'},
|
|
{at: 0.75, expect: '70px'},
|
|
{at: 1, expect: '80px'},
|
|
{at: 1.25, expect: '90px'},
|
|
]);
|
|
|
|
test_interpolation({
|
|
property: 'background-position-y',
|
|
from: 'initial',
|
|
to: 'bottom',
|
|
}, [
|
|
{at: -0.25, expect: '-25%'},
|
|
{at: 0, expect: '0%'},
|
|
{at: 0.25, expect: '25%'},
|
|
{at: 0.5, expect: '50%'},
|
|
{at: 0.75, expect: '75%'},
|
|
{at: 1, expect: '100%'},
|
|
{at: 1.25, expect: '125%'},
|
|
]);
|
|
|
|
test_interpolation({
|
|
property: 'background-position-y',
|
|
from: 'inherit',
|
|
to: '80px',
|
|
}, [
|
|
{at: -0.25, expect: '55px'},
|
|
{at: 0, expect: '60px'},
|
|
{at: 0.25, expect: '65px'},
|
|
{at: 0.5, expect: '70px'},
|
|
{at: 0.75, expect: '75px'},
|
|
{at: 1, expect: '80px'},
|
|
{at: 1.25, expect: '85px'},
|
|
]);
|
|
|
|
test_interpolation({
|
|
property: 'background-position-y',
|
|
from: '300px, 400px',
|
|
to: '500px, 600px, 700px',
|
|
}, [
|
|
{at: -0.25, expect: '250px, 350px, 200px, 375px, 225px, 325px'},
|
|
{at: 0, expect: '300px, 400px, 300px, 400px, 300px, 400px'},
|
|
{at: 0.25, expect: '350px, 450px, 400px, 425px, 375px, 475px'},
|
|
{at: 0.5, expect: '400px, 500px, 500px, 450px, 450px, 550px'},
|
|
{at: 0.75, expect: '450px, 550px, 600px, 475px, 525px, 625px'},
|
|
{at: 1, expect: '500px, 600px, 700px, 500px, 600px, 700px'},
|
|
{at: 1.25, expect: '550px, 650px, 800px, 525px, 675px, 775px'},
|
|
]);
|
|
</script>
|
|
</body>
|