41 lines
917 B
HTML
41 lines
917 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="../resources/animation-test-helpers.js"></script>
|
|
<style>
|
|
|
|
@keyframes TheAnimation {
|
|
from {
|
|
font-stretch: 151%;
|
|
}
|
|
to {
|
|
font-stretch: 199%;
|
|
}
|
|
}
|
|
|
|
#box {
|
|
font-size: 100px;
|
|
animation-duration: 3s;
|
|
animation-timing-function: linear;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="box">Hello</div>
|
|
<div id="result"></div>
|
|
<script>
|
|
var expectedValues = [
|
|
// [animation-name, time, element-id, property, expected-value, tolerance]
|
|
["TheAnimation", 0.5, "box", "font-stretch", "159", 1],
|
|
["TheAnimation", 1.0, "box", "font-stretch", "167", 1],
|
|
["TheAnimation", 2.0, "box", "font-stretch", "183", 1],
|
|
];
|
|
|
|
document.fonts.ready.then(function() {
|
|
document.getElementById("box").style.animationName = "TheAnimation";
|
|
runAnimationTest(expectedValues, undefined, undefined, undefined, false, undefined);
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|