blob: d47ddd72ae9be67080a8b62c106db27736123909 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<title>
Forced colors mode - animations.
For properties affected by forced colors mode, animations should run if
forced-color-adjust is none.
</title>
<link rel="help" href="https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../../../../animations/resources/animation-test-helpers.js"></script>
<style media="screen">
#box {
animation-duration: 1s;
animation-iteration-count: infinite;
animation-timing-function: linear;
animation-name: anim;
forced-color-adjust: none;
}
@keyframes anim {
from { color: red; }
to { color: green; }
}
</style>
<script type="text/javascript" charset="utf-8">
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.0, "box", "color", "rgb(255, 0, 0)", 1],
[0.5, "box", "color", "rgb(128, 64, 0)", 1],
[1.0, "box", "color", "rgb(255, 0, 0)", 1],
];
runAnimationTest(expectedValues);
</script>
<body>
<div id="box"></div>
</body>