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 background-color: lightsteelblue; | |
21 position: absolute; | |
22 width: 100px; | |
23 height: 100px; | |
24 top: 0px; | |
25 left: 0px; | |
26 } | |
27 | |
28 #b { | |
29 top: 100px; | |
30 -webkit-transform: scale(0.5); | |
31 transform: scale(0.5); | |
32 } | |
33 | |
34 #c { | |
35 top: 200px; | |
36 -webkit-transform: rotate(45deg); | |
37 transform: rotate(45deg); | |
38 } | |
39 | |
40 #d { | |
41 top: 300px; | |
42 -webkit-transform: rotate(45deg) translate(100px); | |
43 transform: rotate(45deg) translate(100px); | |
44 } | |
45 | |
46 #e { | |
47 top: 400px; | |
48 -webkit-transform: scale(2) rotate(45deg) translate(100px); | |
49 transform: scale(2) rotate(45deg) translate(100px); | |
50 } | |
51 .expectation { | |
52 fill: red; | |
53 } | |
54 </style> | |
55 <div class="anim" id="a"></div> | |
56 <div class="anim" id="b"></div> | |
57 <div class="anim" id="c"></div> | |
58 <div class="anim" id="d"></div> | |
59 <div class="anim" id="e"></div> | |
60 <div style="height: 550px"></div> | |
61 | |
62 <script> | |
63 var expected_failures = [ | |
64 { | |
65 browser_configurations: [{ msie: true }], | |
66 tests: ['Auto generated tests at t=((?!(4|8|1200.0+1|16|2))[0-9.]+)ms'], | |
67 message: 'Getting weird numbers.', | |
68 } | |
69 ]; | |
70 </script> | |
71 <script src="../bootstrap.js"></script> | |
72 <script> | |
73 "use strict"; | |
74 var a = document.querySelector("#a") | |
75 var b = document.querySelector("#b") | |
76 var c = document.querySelector("#c") | |
77 var d = document.querySelector("#d") | |
78 var e = document.querySelector("#e") | |
79 | |
80 var dt = document.timeline; | |
81 | |
82 var timing = {duration: 2 * 1000, fill: 'forwards'}; | |
83 | |
84 dt.play(new Animation(a, {transform: "translate(100px)"}, timing)); | |
85 dt.play(new Animation(b, {transform: "translate(100px)"}, timing)); | |
86 dt.play(new Animation(c, {transform: "translate(100px)"}, timing)); | |
87 dt.play(new Animation(d, {transform: "translate(100px) rotate(45deg)"}, timing))
; | |
88 dt.play(new Animation(e, | |
89 {transform: "translate(100px) rotate(20deg) scale(0.5)"}, timing)); | |
90 </script> | |
OLD | NEW |