OLD | NEW |
(Empty) | |
| 1 <sky> |
| 2 <import src="../resources/chai.sky" /> |
| 3 <import src="../resources/mocha.sky" /> |
| 4 <div></div> |
| 5 <style> |
| 6 div { |
| 7 width: 100px; |
| 8 height: 100px; |
| 9 background: red; |
| 10 position: relative; |
| 11 transition: width 2s; |
| 12 transition-timing-function: linear; |
| 13 } |
| 14 |
| 15 div#example { |
| 16 width: 200px; |
| 17 } |
| 18 </style> |
| 19 <script> |
| 20 var example = document.querySelector('div'); |
| 21 example.offsetWidth; // force a style resolution so that next line's assigment t
riggers the transition |
| 22 example.id = "example"; |
| 23 |
| 24 describe('width', function() { |
| 25 it('should transition from 100px to 200px', function() { |
| 26 internals.pauseAnimations(1); |
| 27 assert.equal('150px', getComputedStyle(example).width); |
| 28 }); |
| 29 }); |
| 30 </script> |
| 31 </sky> |
OLD | NEW |