blob: fbc56e8c875f14fe9368347d6c3f66719c705730 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=false ] -->
<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>