| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <title>Test simultaneous starting of two animations</title> |
| <style type="text/css" media="screen"> |
| .box { |
| position: relative; |
| left: 100px; |
| height: 100px; |
| width: 100px; |
| background-color: blue; |
| -webkit-animation-duration: 10s; |
| -webkit-animation-timing-function: linear; |
| -webkit-animation-name: "anim"; |
| } |
| @-webkit-keyframes "anim" { |
| from { left: 10px; } |
| to { left: 810px; } |
| } |
| #box1 { |
| top: 10px; |
| background-color: blue; |
| } |
| #box2 { |
| top: 10px; |
| background-color: red; |
| } |
| </style> |
| <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script> |
| <script type="text/javascript" charset="utf-8"> |
| |
| const expectedValues = [ |
| // [animation-name, time, element-id, property, expected-value, tolerance] |
| ["anim", 2, "box1", "left", 170, 5], |
| ["anim", 2, "box2", "left", 170, 5], |
| ["anim", 2, ["box1", "box2"], "left", "", 0], |
| ["anim", 5, "box1", "left", 410, 5], |
| ["anim", 5, "box2", "left", 410, 5], |
| ["anim", 5, ["box1", "box2"], "left", "", 0], |
| ["anim", 8, "box1", "left", 650, 5], |
| ["anim", 8, "box2", "left", 650, 5], |
| ["anim", 8, ["box1", "box2"], "left", "", 0], |
| ]; |
| |
| runAnimationTest(expectedValues); |
| |
| </script> |
| </head> |
| <body> |
| This test performs an animation of the left property. It animates over 10 seconds. |
| It takes 3 snapshots and expects each result to be within a specified range. |
| <div id="box1" class="box"> |
| </div> |
| <div id="box2" class="box"> |
| </div> |
| <div id="result"> |
| </div> |
| </body> |
| </html> |