blob: 40d7eb1002ffd2ce3263aa74d5f9e4bb1d9dbb7b [file] [log] [blame]
<html>
<head>
<style>
#box {
position: absolute;
left: 100px;
top: 100px;
height: 200px;
width: 200px;
background-color: red;
-webkit-animation: anim 1s linear infinite;
}
#boxStatic {
position: absolute;
left: 100px;
top: 300px;
height: 200px;
width: 200px;
background-color: red;
-webkit-mask-box-image: -webkit-cross-fade(url(resources/stripes-100.png), url(resources/green-100.png), 25%) 50 stretch;
}
@-webkit-keyframes anim {
from { -webkit-mask-box-image: url(resources/stripes-100.png) 50 stretch; }
to { -webkit-mask-box-image: url(resources/green-100.png) 50 stretch; }
}
</style>
<script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
// This test was flaky because it would start before the images were loaded.
var imagesLoaded = 0;
function imageLoaded() {
++imagesLoaded;
if (imagesLoaded == 2) {
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[2.25, ["box", "boxStatic"], "webkitMaskBoxImage", 0.25, 0.05]
];
var doPixelTest = true;
var disablePauseAPI = false;
var startTestImmediately = true;
runAnimationTest(expectedValues, undefined, undefined, disablePauseAPI, doPixelTest, startTestImmediately);
}
}
</script>
</head>
<body>
<img id="box" src="resources/green-100.png" onLoad="imageLoaded();"/>
<img id="boxStatic" src="resources/stripes-100.png" onLoad="imageLoaded();"/>
<div id="result"></div>
</body>
</html>