summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-easing/linear-timing-functions-syntax.tentative.html
blob: 73267f08604d0243d63712c34fd073d58715f0b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Easing: getComputedStyle().animationTimingFunction with linear(...)</title>
<link rel="help" href="https://github.com/w3c/csswg-drafts/pull/6533">
<meta name="assert" content="animation-timing-function: linear(...) parsing tests">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_valid_value("animation-timing-function", "linear()");
test_valid_value("animation-timing-function", "linear(0)");
test_valid_value("animation-timing-function", "linear(0, 1)");
test_valid_value("animation-timing-function", "linear(0 0% 100%)", "linear(0 0%, 0 100%)");
test_valid_value("animation-timing-function", "linear(0% 100% 0)", "linear(0 0%, 0 100%)");
test_valid_value("animation-timing-function", "linear(0 0% 50%, 1 50% 100%)", "linear(0 0%, 0 50%, 1 50%, 1 100%)");
test_valid_value("animation-timing-function", "linear(0, 0.5 25% 75%, 1 100% 100%)", "linear(0, 0.5 25%, 0.5 75%, 1 100%, 1 100%)");
test_valid_value("animation-timing-function", "linear(0, 1.3, 1, 0.92, 1, 0.99, 1, 1.004, 0.998, 1 100% 100%)", "linear(0, 1.3, 1, 0.92, 1, 0.99, 1, 1.004, 0.998, 1 100%, 1 100%)");

test_invalid_value("animation-timing-function", "linear(100%)");
test_invalid_value("animation-timing-function", "linear(0% 1 50%)");

test_computed_value("animation-timing-function", "linear()");
test_computed_value("animation-timing-function", "linear(0)", "linear(0 0%)");
test_computed_value("animation-timing-function", "linear(0, 1)", "linear(0 0%, 1 100%)");
test_computed_value("animation-timing-function", "linear(0 0% 100%)", "linear(0 0%, 0 100%)");
test_computed_value("animation-timing-function", "linear(0% 100% 0)", "linear(0 0%, 0 100%)");
test_computed_value("animation-timing-function", "linear(0 0% 50%, 1 50% 100%)", "linear(0 0%, 0 50%, 1 50%, 1 100%)");
test_computed_value("animation-timing-function", "linear(0, 0.5 25% 75%, 1 100% 100%)", "linear(0 0%, 0.5 25%, 0.5 75%, 1 100%, 1 100%)");
test_computed_value("animation-timing-function", "linear(0, 1.3, 1, 0.92, 1, 0.99, 1, 0.998, 1 100% 100%)", "linear(0 0%, 1.3 12.5%, 1 25%, 0.92 37.5%, 1 50%, 0.99 62.5%, 1 75%, 0.998 87.5%, 1 100%, 1 100%)");
</script>
</body>
</html>