flutter_flutter/tests/animation/basic-transition.sky
Rafael Weinstein f38f80c9f8 Enable/Unprefix Animations & Transitions, add basic tests
This patch remove the Web Animations & CSS Animation runtime flags (and enables both). Removes prefixed Aninamations & Transitions and adds some basic tests & test support API.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/760183003
2014-12-10 10:38:34 -08:00

32 lines
685 B
Plaintext

<sky>
<import src="../resources/chai.sky" />
<import src="../resources/mocha.sky" />
<div></div>
<style>
div {
width: 100px;
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>