Chromium Code Reviews| Index: sky/tests/animation/basic-transition.sky |
| diff --git a/sky/tests/animation/basic-transition.sky b/sky/tests/animation/basic-transition.sky |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9d23941c99645a806104cd659d0e6ad6ad5d1e41 |
| --- /dev/null |
| +++ b/sky/tests/animation/basic-transition.sky |
| @@ -0,0 +1,31 @@ |
| +<sky> |
| +<import src="../resources/chai.sky" /> |
| +<import src="../resources/mocha.sky" /> |
| +<div></div> |
| +<style> |
| +div { |
| + width: 100px; |
|
ojan
2014/12/10 03:48:16
Inconsistent indentation
rafaelw
2014/12/10 18:30:24
Done.
|
| + height: 100px; |
| + background: red; |
| + position: relative; |
| + transition: width 2s; |
| + transition-timing-function: linear; |
| +} |
| + |
| +div#example { |
| + width: 200px; |
| +} |
| +</style> |
| +<script> |
| +var example = document.querySelector('div'); |
| +example.offsetWidth; // force a style resolution so that next line's assigment triggers the transition |
| +example.id = "example"; |
| + |
| +describe('width', function() { |
| + it('should transition from 100px to 200px', function() { |
| + internals.pauseAnimations(1); |
| + assert.equal('150px', getComputedStyle(example).width); |
| + }); |
| +}); |
| +</script> |
| +</sky> |