Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / animations / 3d / transform-perspective.html
blobd82c43182bfccd493f472ebcd95f97fb97fcda39
1 <!DOCTYPE html>
3 <html>
4 <head>
5 <style type="text/css">
6 .box {
7 height: 100px;
8 width: 100px;
9 background-color: blue;
12 #box {
13 -webkit-animation: anim 2s linear;
16 #box2 {
17 -webkit-animation: anim2 2s linear;
20 @-webkit-keyframes anim {
21 from { transform: perspective(100px); }
22 to { transform: perspective(200px); }
25 @-webkit-keyframes anim2 {
26 from { transform: perspective(1000px); }
27 to { transform: none; }
29 </style>
30 <script src="../resources/animation-test-helpers.js" type="text/javascript"></script>
31 <script type="text/javascript">
32 const expectedValues = [
33 // [time, element-id, property, expected-value, tolerance]
34 [0.5, "box", "transform", "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.0075, 0, 0, 0, 1)", 0.002],
35 [0.5, "box2", "transform", "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.00199, 0, 0, 0, 1)", 0.002],
38 function setupTest()
40 var box = document.getElementById('box');
41 box.style.webkitTransform = 'perspective(1000px) rotateX(90deg)';
44 runAnimationTest(expectedValues);
45 </script>
46 </head>
47 <body>
49 <div class="box" id="box"></div>
50 <div class="box" id="box2"></div>
51 <div id="result"></div>
53 </body>
54 </html>