Skip to content

Commit 91eaa6d

Browse files
Fredrik Söderquistchromium-wpt-export-bot
authored andcommitted
Move animations/composition/baseline-shift-composition.html to WPT
Move the test and perform a mechanical rewrite: * Change assertComposition() to test_composition(). * Change 'is' to 'expect' in the expectation objects. * Include required testharness.js and framework. * Add link to spec. Bug: 4066383 Change-Id: I3054b6153efaa652b9703794ce823d08e5416268 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7185724 Auto-Submit: Fredrik Söderquist <[email protected]> Reviewed-by: Kevin Ellis <[email protected]> Commit-Queue: Kevin Ellis <[email protected]> Cr-Commit-Position: refs/heads/main@{#1548529}
1 parent d29bb34 commit 91eaa6d

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!DOCTYPE html>
2+
<meta charset="UTF-8">
3+
<title>baseline-shift composition</title>
4+
<link rel="help" href="https://drafts.csswg.org/css-inline/#baseline-shift-property">
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<script src="/css/support/interpolation-testcommon.js"></script>
8+
<body>
9+
<script>
10+
test_composition({
11+
property: 'baseline-shift',
12+
underlying: '50px',
13+
addFrom: '100px',
14+
addTo: '200px',
15+
}, [
16+
{at: -0.3, expect: '120px'},
17+
{at: 0, expect: '150px'},
18+
{at: 0.5, expect: '200px'},
19+
{at: 1, expect: '250px'},
20+
{at: 1.5, expect: '300px'},
21+
]);
22+
23+
test_composition({
24+
property: 'baseline-shift',
25+
underlying: '100px',
26+
addFrom: '10px',
27+
addTo: '2px',
28+
}, [
29+
{at: -0.5, expect: '114px'},
30+
{at: 0, expect: '110px'},
31+
{at: 0.5, expect: '106px'},
32+
{at: 1, expect: '102px'},
33+
{at: 1.5, expect: '98px'},
34+
]);
35+
36+
test_composition({
37+
property: 'baseline-shift',
38+
underlying: '50px',
39+
addFrom: '100px',
40+
replaceTo: '200px',
41+
}, [
42+
{at: -0.3, expect: '135px'},
43+
{at: 0, expect: '150px'},
44+
{at: 0.5, expect: '175px'},
45+
{at: 1, expect: '200px'},
46+
{at: 1.5, expect: '225px'},
47+
]);
48+
</script>
49+
</body>

0 commit comments

Comments
 (0)