Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / transitions / flex-transitions.html
blob4d580a00c083327ebb931e8db406fcff23d3bd79
1 <!DOCTYPE>
2 <html>
3 <head>
4 <style>
5 .flexbox {
6 display: -webkit-flex;
7 width: 100px;
8 height: 100px;
9 margin-bottom: 10px;
11 .flexbox :nth-child(1) {
12 background-color: blue;
14 .flexbox :nth-child(2) {
15 background-color: green;
17 .flexbox div {
18 -webkit-transition-property: -webkit-flex;
19 -webkit-transition-duration: 1s;
20 -webkit-transition-timing-function: linear;
23 #flex-row div {
24 -webkit-flex: 100 0 0px;
26 .final #row1 {
27 -webkit-flex: 300 0 0px;
30 #flex-column {
31 -webkit-flex-direction: column;
33 #flex-column div {
34 -webkit-flex: 100 0 0px;
36 .final #column1 {
37 -webkit-flex: 0 0 200px;
40 #flex-negative div {
41 -webkit-flex: 100 100 50px;
43 .final #negative1 {
44 -webkit-flex: 100 100 100px;
47 #flex-no-flex div {
48 -webkit-flex: 100 0 0px;
50 .final #no-flex1 {
51 -webkit-flex: 0 0 0px;
54 </style>
55 <script src="../animations/resources/animation-test-helpers.js"></script>
56 <script type="text/javascript">
58 const expectedValues = [
59 // [time, element-id, property, expected-value, tolerance]
60 [0.2, 'row1', '-webkit-flex', [140, 0, 0], 10],
61 [0.2, 'column1', '-webkit-flex', [80, 0, 40], 10],
62 [0.2, 'negative1', '-webkit-flex', [100, 100, 60], 10],
63 [0.2, 'no-flex1', '-webkit-flex', [80, 0, 0], 10],
64 [0.8, 'row1', '-webkit-flex', [260, 0, 0], 10],
65 [0.8, 'column1', '-webkit-flex', [20, 0, 160], 10],
66 [0.8, 'negative1', '-webkit-flex', [100, 100, 90], 10],
67 [0.8, 'no-flex1', '-webkit-flex', [20, 0, 0], 10],
70 function setupTest()
72 document.body.className = 'final';
75 runTransitionTest(expectedValues, setupTest);
76 </script>
77 </head>
78 <body>
80 <div id="flex-row" class='flexbox'>
81 <div id="row1"></div>
82 <div id="row2"></div>
83 </div>
85 <div id="flex-column" class='flexbox'>
86 <div id="column1"></div>
87 <div id="column2"></div>
88 </div>
90 <div id="flex-negative" class='flexbox'>
91 <div id="negative1"></div>
92 <div id="negative2"></div>
93 </div>
95 <div id="flex-no-flex" class='flexbox'>
96 <div id="no-flex1"></div>
97 <div id="no-flex2"></div>
98 </div>
100 <div id="result"></div>
101 </body>
102 </html>