blob: c602516e6d899cdc1553b01d686b90a1b57f3eac [file] [log] [blame]
<!DOCTYPE>
<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="../animations/resources/animation-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);
</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>