blob: 1204117bcc320c12a81ee2beee228e411f99b9c7 [file] [log] [blame]
<!DOCTYPE><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->
<html>
<head>
<style>
#container {
border: 1px solid black;
width: 300px;
height: 300px;
}
.box {
width: 100px;
height: 100px;
margin: 10px;
background-color: blue;
-webkit-transition-property: min-width, min-height, max-width, max-height;
-webkit-transition-duration: 1s;
-webkit-transition-timing-function: linear;
}
.minner {
min-width: 100px;
min-height: 100px;
}
#container.final .minner {
min-width: 200px;
min-height: 200px;
}
.maxer {
max-width: 100px;
max-height: 100px;
}
#container.final .maxer {
max-width: 50px;
max-height: 50px;
}
</style>
<script src="resources/transition-test-helpers.js"></script>
<script type="text/javascript">
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.5, 'box1', 'min-height', 150, 2],
[0.5, 'box1', 'min-width', 150, 2],
[0.5, 'box2', 'max-height', 75, 2],
[0.5, 'box2', 'max-width', 75, 2],
];
function setupTest()
{
document.getElementById('container').className = 'final';
}
runTransitionTest(expectedValues, setupTest, usePauseAPI);
</script>
</head>
<body>
<div id="container">
<div id="box1" class='minner box'></div>
<div id="box2" class='maxer box'></div>
</div>
<div id="result"></div>
</body>
</html>