aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2012-06-11 14:17:36 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-06-11 14:17:36 -0400
commit801768386b9fd44f1282834449b4cd1ae1e8d593 (patch)
tree7e01e91f34424126468e9f9534234dd4608bc787 /test
parent142ff73450c02254a0fd866a0688c4720f8d2bdf (diff)
downloadjquery-801768386b9fd44f1282834449b4cd1ae1e8d593.tar.gz
jquery-801768386b9fd44f1282834449b4cd1ae1e8d593.zip
Fix #8109, percent animations; fix #11854, wrong this, close gh-808
Diffstat (limited to 'test')
-rw-r--r--test/unit/effects.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js
index 9e244490d..48793e234 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -1628,4 +1628,22 @@ asyncTest( "multiple unqueued and promise", 4, function() {
});
});
+asyncTest( "animate does not change start value for non-px animation (#7109)", 1, function() {
+ var parent = jQuery( "<div><div></div></div>" ).css({ width: 284, height: 1 }).appendTo( "#qunit-fixture" ),
+ child = parent.children().css({ fontSize: "98.6in", width: "0.01em", height: 1 }),
+ actual = parseFloat( child.css( "width" ) ),
+ computed = [];
+
+ child.animate({ width: "0%" }, {
+ duration: 1,
+ step: function() {
+ computed.push( parseFloat( child.css( "width" ) ) );
+ }
+ }).queue( function( next ) {
+ equal( computed[0], actual, "Starting width was unchanged" );
+ next();
+ start();
+ });
+});
+
} // if ( jQuery.fx )