blob: ba400cac9ebfe1ca10e290a798e99d72b34880ba [file] [log] [blame]
<!DOCTYPE>
<html>
<head>
<style>
.box {
height: 100px;
width: 100px;
margin: 10px;
-webkit-transition-duration: 1s;
-webkit-transition-timing-function: linear;
}
#box {
background: url('../fast/backgrounds/repeat/resources/gradient.gif') repeat 0 0;
-webkit-transition-property: background-position;
}
#box.final {
background-position: 20px 20px;
}
#box2 {
background: url('../fast/backgrounds/repeat/resources/gradient.gif') repeat 0 0;
-webkit-transition-property: -webkit-background-size;
-webkit-background-size: 10px 10px;
}
#box2.final {
-webkit-background-size: 30px 30px;
}
</style>
<script src="resources/transition-test-helpers.js" type="text/javascript"></script>
<script>
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.5, 'box', 'background-position', [10, 10], 2],
[0.5, 'box2', '-webkit-background-size', [20, 20], 2],
];
function setupTest()
{
document.getElementById('box').className = 'box final';
document.getElementById('box2').className = 'box final';
}
runTransitionTest(expectedValues, setupTest, usePauseAPI);
</script>
</head>
<body>
<div id="box" class="box"></div>
<div id="box2" class="box"></div>
<div id="result">
</div>
</body>
</html>