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 '/Auto generated tests at t=((?!(0.4|0.8|1.20+1|1.6|2))[0-9.]+)s/': { |
| 65 msie: true, |
| 66 message: "Getting weird numbers." |
| 67 } |
| 68 }; |
| 69 </script> |
| 70 <script src="../bootstrap.js"></script> |
| 71 <script> |
| 72 "use strict"; |
| 73 var a = document.querySelector("#a") |
| 74 var b = document.querySelector("#b") |
| 75 var c = document.querySelector("#c") |
| 76 var d = document.querySelector("#d") |
| 77 var e = document.querySelector("#e") |
| 78 |
| 79 var dt = document.timeline; |
| 80 |
| 81 var timing = {duration: 2, fill: 'forwards'}; |
| 82 |
| 83 dt.play(new Animation(a, {transform: "translate(100px)"}, timing)); |
| 84 dt.play(new Animation(b, {transform: "translate(100px)"}, timing)); |
| 85 dt.play(new Animation(c, {transform: "translate(100px)"}, timing)); |
| 86 dt.play(new Animation(d, {transform: "translate(100px) rotate(45deg)"}, timing))
; |
| 87 dt.play(new Animation(e, |
| 88 {transform: "translate(100px) rotate(20deg) scale(0.5)"}, timing)); |
| 89 </script> |
OLD | NEW |