blob: 57d367c065fcbd01b9e5b1b02875dca86fbcfef6 [file] [log] [blame]
<!DOCTYPE><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=false ] -->
<html>
<head>
<title>Scale without initial value.</title>
<style type="text/css" media="screen">
.box {
height: 200px;
width: 200px;
border: 1px solid #EEE;
}
.indicator {
position: absolute;
height: 150px;
width: 150px;
margin: 25px;
-webkit-box-sizing: border-box;
border: 1px solid black;
}
.inner {
height: 100px;
width: 100px;
margin: 50px;
background-color: green;
opacity: 0.7;
-webkit-transition: -webkit-transform 1s linear;
}
.box.final #inner1 {
-webkit-transform: scale(2);
}
.box.final #inner2 {
-webkit-transform: scaleX(2);
}
</style>
<script src="../../transitions/resources/transition-test-helpers.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
[0.5, 'inner1', '-webkit-transform.0', 1.5, 0.1],
[0.5, 'inner2', '-webkit-transform.0', 1.5, 0.1],
];
function setupTest()
{
var boxes = document.querySelectorAll('.box');
boxes[0].className = 'box final';
boxes[1].className = 'box final';
}
runTransitionTest(expectedValues, setupTest, true, true /* pixel test */);
</script>
</head>
<body>
<p>In the pixel result, the green boxes should be coincident with the black outline.</p>
<div class="box" id="box1">
<div class="indicator"></div>
<div class="inner" id="inner1"></div>
</div>
<div class="box" id="box2">
<div class="indicator"></div>
<div class="inner" id="inner2"></div>
</div>
<div id="result"></div>
</body>
</html>