OLD | NEW |
| (Empty) |
1 <!-- | |
2 Copyright 2012 Google Inc. All Rights Reserved. | |
3 | |
4 Licensed under the Apache License, Version 2.0 (the "License"); | |
5 you may not use this file except in compliance with the License. | |
6 You may obtain a copy of the License at | |
7 | |
8 http://www.apache.org/licenses/LICENSE-2.0 | |
9 | |
10 Unless required by applicable law or agreed to in writing, software | |
11 distributed under the License is distributed on an "AS IS" BASIS, | |
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 See the License for the specific language governing permissions and | |
14 limitations under the License. | |
15 --> | |
16 | |
17 <!DOCTYPE html><meta charset="UTF-8"> | |
18 <style> | |
19 .anim { | |
20 left: 0px; | |
21 width: 100px; | |
22 height: 100px; | |
23 background-color: #FAA; | |
24 position: absolute; | |
25 } | |
26 | |
27 .expected { | |
28 width: 100px; | |
29 height: 100px; | |
30 position: absolute; | |
31 border-right: 1px solid black; | |
32 } | |
33 | |
34 #a { | |
35 top: 50px | |
36 } | |
37 | |
38 #b { | |
39 top: 150px; | |
40 } | |
41 | |
42 #c { | |
43 top: 250px; | |
44 } | |
45 | |
46 #d { | |
47 top: 350px; | |
48 } | |
49 | |
50 </style> | |
51 | |
52 <div>Right edge of each box should align with black line at end of test.</div> | |
53 <div id="a" class="anim"></div> | |
54 <div id="a" style="top: 50px; left: 200px;" class="expected"></div> | |
55 <div id="b" class="anim"></div> | |
56 <div id="b" style="top: 150px; left: 0px;" class="expected"></div> | |
57 <div id="c" class="anim"></div> | |
58 <div id="c" style="top: 250px; left: 200px;" class="expected"></div> | |
59 <div id="d" class="anim"></div> | |
60 <div id="d" style="top: 550px; left: 0px;" class="expected"></div> | |
61 | |
62 <div style="height: 700px;"></div> | |
63 | |
64 <script> | |
65 var expected_failures = [ | |
66 { | |
67 browser_configurations: [{ msie: true }], | |
68 tests: ['Auto generated tests at t=2000ms'], | |
69 message: 'Floating point issues.', | |
70 } | |
71 ]; | |
72 </script> | |
73 <script src="../bootstrap.js"></script> | |
74 <script> | |
75 "use strict"; | |
76 | |
77 var divs = document.querySelectorAll(".anim"); | |
78 | |
79 var dt = document.timeline; | |
80 | |
81 var timing = {duration: 2 * 1000, fill: 'forwards'}; | |
82 | |
83 dt.play(new Animation(divs[0], | |
84 [{transform: "translate(0px, 0px)"}, {transform: "translate(200px, 0px)"}], | |
85 timing)); | |
86 dt.play(new Animation(divs[1], | |
87 [{transform: "rotate(0deg)"}, {transform: "rotate(90deg)"}], timing)); | |
88 dt.play(new Animation(divs[2], [ | |
89 {transform: "translate(0px, 0px) rotate(0deg)"}, | |
90 {transform: "translate(200px, 0px) rotate(90deg)"}, | |
91 ], timing)); | |
92 dt.play(new Animation(divs[3], [ | |
93 {transform: "rotate(0deg) translate(0px, 0px)"}, | |
94 {transform: "rotate(90deg) translate(200px, 0px)"}, | |
95 ], timing)); | |
96 | |
97 </script> | |
OLD | NEW |