| 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: 25px; | |
| 23 background-color: #FAA; | |
| 24 position: relative; | |
| 25 } | |
| 26 | |
| 27 .expected { | |
| 28 border-right: 1px solid black; | |
| 29 } | |
| 30 | |
| 31 </style> | |
| 32 | |
| 33 <div>Right edge of each box should align with black line at end of test.</div> | |
| 34 | |
| 35 <div style="width: 400px;" class="expected"> | |
| 36 <div id="a" class="anim"></div> | |
| 37 </div> | |
| 38 | |
| 39 <script src="../bootstrap.js"></script> | |
| 40 <script> | |
| 41 "use strict"; | |
| 42 | |
| 43 // Run a simple animation. It should animate indefinitely. | |
| 44 var anim = new Animation(document.getElementById("a"), | |
| 45 [{left: "100px"}, {left: "500px"}], {iterations: Infinity, duration: 2.0 * 1
000}); | |
| 46 document.timeline.play(anim); | |
| 47 | |
| 48 // After 3.0s, move it to a parallel group and run that. | |
| 49 testharness_timeline.schedule(function() { | |
| 50 document.timeline.play(new AnimationGroup([anim], | |
| 51 {duration: 1.0 * 1000, iterations: 3.0})); | |
| 52 }, 3000); | |
| 53 | |
| 54 // After 3.0s, move it to a parallel group and run that. | |
| 55 testharness_timeline.schedule(function() { | |
| 56 document.timeline.play(new AnimationGroup([anim], | |
| 57 {duration: 1.5 * 1000, iterations: 3.0})); | |
| 58 }, 8000); | |
| 59 | |
| 60 </script> | |
| OLD | NEW |