blob: 72823541582c7567e9d8adef70af027fa74625a9 [file] [log] [blame]
<html>
<head>
<style>
#box {
position: absolute;
left: 100px;
top: 100px;
height: 100px;
width: 100px;
}
#boxShorthand {
position: absolute;
left: 400px;
top: 100px;
height: 100px;
width: 100px;
}
#boxStatic {
position: absolute;
left: 100px;
top: 350px;
height: 100px;
width: 100px;
list-style: square -webkit-cross-fade(url(resources/blue-100.png), url(resources/green-100.png), 50%);
}
@keyframes anim {
from { list-style-image: url(resources/blue-100.png); }
to { list-style-image: url(resources/green-100.png); }
}
@keyframes animShorthand {
from { list-style: square url(resources/blue-100.png); }
to { list-style: square url(resources/green-100.png); }
}
</style>
<script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
function runTest() {
document.querySelector('#box').style.animation = "anim 1s linear infinite";
document.querySelector('#boxShorthand').style.animation = "animShorthand 1s linear infinite";
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[2.5, ["box", "boxStatic"], "listStyleImage", 0.5, 0.05],
[2.5, ["boxShorthand", "boxStatic"], "listStyleImage", 0.5, 0.05],
];
var doPixelTest = true;
var disablePauseAPI = false;
runAnimationTest(expectedValues, null, undefined, disablePauseAPI, doPixelTest);
}
</script>
</head>
<body onload="runTest()">
<ul id="box"><li>one</li><li>two</li></ul>
<ul id="boxStatic"><li>one</li><li>two</li></ul>
<ul id="boxShorthand"><li>one</li><li>two</li></ul>
<div id="result"></div>
</body>
</html>