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 'Auto generated tests at t=2s': { |
| 67 msie: true, |
| 68 message: "Floating point issues." |
| 69 } |
| 70 }; |
| 71 </script> |
| 72 <script src="../bootstrap.js"></script> |
| 73 <script> |
| 74 "use strict"; |
| 75 |
| 76 var divs = document.querySelectorAll(".anim"); |
| 77 |
| 78 var dt = document.timeline; |
| 79 |
| 80 var timing = {duration: 2, fill: 'forwards'}; |
| 81 |
| 82 dt.play(new Animation(divs[0], |
| 83 [{transform: "translate(0px, 0px)"}, {transform: "translate(200px, 0px)"}], |
| 84 timing)); |
| 85 dt.play(new Animation(divs[1], |
| 86 [{transform: "rotate(0deg)"}, {transform: "rotate(90deg)"}], timing)); |
| 87 dt.play(new Animation(divs[2], [ |
| 88 {transform: "translate(0px, 0px) rotate(0deg)"}, |
| 89 {transform: "translate(200px, 0px) rotate(90deg)"}, |
| 90 ], timing)); |
| 91 dt.play(new Animation(divs[3], [ |
| 92 {transform: "rotate(0deg) translate(0px, 0px)"}, |
| 93 {transform: "rotate(90deg) translate(200px, 0px)"}, |
| 94 ], timing)); |
| 95 |
| 96 </script> |
OLD | NEW |