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

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

Issue 760183003: Enable/Unprefix Animations & Transitions, add basic tests (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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-declarative.sky
diff --git a/sky/tests/animation/basic-declarative.sky b/sky/tests/animation/basic-declarative.sky
new file mode 100644
index 0000000000000000000000000000000000000000..6ef45fa928f884479384a56cf930294cdbbd9277
--- /dev/null
+++ b/sky/tests/animation/basic-declarative.sky
@@ -0,0 +1,31 @@
+<sky>
+<import src="../resources/chai.sky" />
+<import src="../resources/mocha.sky" />
+<div id="example"></div>
+<style>
+#example {
+ width: 100px;
+ height: 100px;
+ background: red;
+ position: relative;
+ animation-name: anim;
+ animation-timing-function: linear;
+ animation-duration: 5s;
+}
+
+@keyframes anim {
+ 0% { top: 0px; }
+ 100% { top: 100px; }
+}
+</style>
+<script>
+var example = document.getElementById('example');
+
+describe('top', function() {
+ it('should amimate from 0 to 100px', function() {
+internals.pauseAnimations(3);
ojan 2014/12/10 03:48:16 Nit: indentation
rafaelw 2014/12/10 18:30:24 Done.
+ assert.equal('60px', getComputedStyle(example).top);
+ });
+});
+</script>
+</sky>

Powered by Google App Engine
This is Rietveld 408576698