OLD | NEW |
---|---|
(Empty) | |
1 <sky> | |
2 <import src="../resources/chai.sky" /> | |
3 <import src="../resources/mocha.sky" /> | |
4 <div id="example"></div> | |
5 <style> | |
6 #example { | |
7 width: 100px; | |
8 height: 100px; | |
9 background: red; | |
10 position: relative; | |
11 animation-name: anim; | |
12 animation-timing-function: linear; | |
13 animation-duration: 5s; | |
14 } | |
15 | |
16 @keyframes anim { | |
17 0% { top: 0px; } | |
18 100% { top: 100px; } | |
19 } | |
20 </style> | |
21 <script> | |
22 var example = document.getElementById('example'); | |
23 | |
24 describe('top', function() { | |
25 it('should amimate from 0 to 100px', function() { | |
26 internals.pauseAnimations(3); | |
ojan
2014/12/10 03:48:16
Nit: indentation
rafaelw
2014/12/10 18:30:24
Done.
| |
27 assert.equal('60px', getComputedStyle(example).top); | |
28 }); | |
29 }); | |
30 </script> | |
31 </sky> | |
OLD | NEW |