Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2139)

Unified Diff: sky/tests/animation/basic-transition.sky

Issue 760183003: Enable/Unprefix Animations & Transitions, add basic tests (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: patch for landing Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..7fa2218d38d91a66fe79f7ffa6a83012d7ceb204
--- /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;
+ 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>
« no previous file with comments | « sky/tests/animation/basic-imperative-expected.txt ('k') | sky/tests/animation/basic-transition-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698