OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style type="text/css"> | 4 <style type="text/css"> |
5 .anim { | 5 .anim { |
6 position: absolute; | 6 position: absolute; |
7 left: 10px; | 7 left: 10px; |
8 height: 90px; | 8 height: 90px; |
9 width: 100px; | 9 width: 100px; |
10 background-color: blue; | 10 background-color: blue; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 function onFinishBottom(event) { | 87 function onFinishBottom(event) { |
88 validateFinishEvent(playerBottom, event); | 88 validateFinishEvent(playerBottom, event); |
89 | 89 |
90 if (firstBottom) { | 90 if (firstBottom) { |
91 firstBottom = false; | 91 firstBottom = false; |
92 playerBottom.reverse(); | 92 playerBottom.reverse(); |
93 } else { | 93 } else { |
94 testRunner.notifyDone(); | 94 if (window.testRunner) { |
| 95 testRunner.notifyDone(); |
| 96 } |
95 } | 97 } |
96 } | 98 } |
97 | 99 |
98 function animate() { | 100 function animate() { |
99 | 101 |
100 playerTop = document.getElementById('top').animate(keyframes, 0.05); | 102 playerTop = document.getElementById('top').animate(keyframes, 0.05); |
101 playerTop.name = 'playerTop'; | 103 playerTop.name = 'playerTop'; |
102 playerTop.onfinish = onFinishTop; | 104 playerTop.onfinish = onFinishTop; |
103 | 105 |
104 if (window.testRunner) { | 106 if (window.testRunner) { |
105 testRunner.dumpAsText(); | 107 testRunner.dumpAsText(); |
106 testRunner.waitUntilDone(); | 108 testRunner.waitUntilDone(); |
107 } | 109 } |
108 } | 110 } |
109 | 111 |
110 window.onload = animate; | 112 window.onload = animate; |
111 | 113 |
112 </script> | 114 </script> |
113 </head> | 115 </head> |
114 <body> | 116 <body> |
115 <div class="anim" id="top"></div> | 117 <div class="anim" id="top"></div> |
116 <div class="anim" id="middle"></div> | 118 <div class="anim" id="middle"></div> |
117 <div class="anim" id="bottom"></div> | 119 <div class="anim" id="bottom"></div> |
118 <div id="results"></div> | 120 <div id="results"></div> |
119 </body> | 121 </body> |
120 </html> | 122 </html> |
121 | 123 |
OLD | NEW |