blob: c73fd4aa83cfad95b50b6e63591e9ae6798956dd [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->
<html>
<head>
<style>
.box {
width: 100px;
height: 100px;
margin: 10px;
border: 1px solid black;
-webkit-transition: background-color 1s linear;
-moz-transition: background-color 1s linear;
}
#one {
background-color: transparent;
}
#one.changed {
background-color: green;
}
#two {
background-color: rgba(0, 255, 0, 0);
}
#two.changed {
background-color: rgba(0, 0, 255, 1);
}
</style>
<script src="resources/transition-test-helpers.js"></script>
<script type="text/javascript">
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.5, 'one', 'background-color', [0, 127, 0], 2],
[0.5, 'two', 'background-color', [0, 0, 255], 2]
];
function setupTest()
{
document.getElementById('one').className = 'box changed';
document.getElementById('two').className = 'box changed';
}
runTransitionTest(expectedValues, setupTest, usePauseAPI);
</script>
</head>
<body>
<div class="box" id="one">
</div>
<div class="box" id="two">
</div>
<div id="result">
</div>
</body>
</html>