diff options
author | gnarf <gnarf@gnarf.net> | 2011-05-18 18:13:37 -0500 |
---|---|---|
committer | gnarf <gnarf@gnarf.net> | 2011-05-18 18:13:37 -0500 |
commit | 4fc5ea141dea716c85d07f17c4b345263b464ef3 (patch) | |
tree | 94a8e4dc7487e4ab595698ff5fdea168dd7daeaf /tests | |
parent | 4f0f407df3f1808112148a3a488c7bb76b9583db (diff) | |
download | jquery-ui-4fc5ea141dea716c85d07f17c4b345263b464ef3.tar.gz jquery-ui-4fc5ea141dea716c85d07f17c4b345263b464ef3.zip |
Unit Tests & effects.scale: Fixing bugs in effects unit tests - Particularly IE, found a bug in scale.js in the meantime. Fixes #7395 - Size based effects are breaking unit tests in IE - also leaking a global var
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/effects/effects.html | 3 | ||||
-rw-r--r-- | tests/unit/effects/effects_core.js | 13 |
2 files changed, 10 insertions, 6 deletions
diff --git a/tests/unit/effects/effects.html b/tests/unit/effects/effects.html index 0879a98b2..84fecd9cc 100644 --- a/tests/unit/effects/effects.html +++ b/tests/unit/effects/effects.html @@ -38,10 +38,13 @@ .test { background: #000; border: 0; + width: 100px; + height: 100px; } .testAddBorder { border: 10px solid #000; } + .testChildren, .testChangeBackground { background: #fff; } diff --git a/tests/unit/effects/effects_core.js b/tests/unit/effects/effects_core.js index 8d2e8f8df..ed9fbf9ba 100644 --- a/tests/unit/effects/effects_core.js +++ b/tests/unit/effects/effects_core.js @@ -77,12 +77,12 @@ asyncTest( "animateClass works with colors", function() { count = 0; expect(2); test.toggleClass("testChangeBackground", duration, function() { - present( test.css("backgroundColor"), [ "#ffffff", "rgb(255, 255, 255)" ], "Color is final" ); + present( test.css("backgroundColor"), [ "#ffffff", "#fff", "rgb(255, 255, 255)" ], "Color is final" ); start(); }); setTimeout(function() { var color = test.css("backgroundColor"); - notPresent( color, [ "#000000", "#ffffff", "rgb(0, 0, 0)", "rgb(255,255,255)" ], + notPresent( color, [ "#000000", "#ffffff", "#000", "#fff", "rgb(0, 0, 0)", "rgb(255,255,255)" ], "Color is not endpoints in middle." ); }, mid); }); @@ -92,19 +92,20 @@ asyncTest( "animateClass works with children", function() { h2 = test.find("h2"); expect(4); + setTimeout(function() { + notPresent( h2.css("fontSize"), ["10px","20px"], "Font size is neither endpoint when in middle."); + }, mid); test.toggleClass("testChildren", { children: true, duration: duration, complete: function() { equal( h2.css("fontSize"), "20px", "Text size is final during complete"); test.toggleClass("testChildren", duration, function() { equal( h2.css("fontSize"), "10px", "Text size revertted after class removed"); + start(); }); setTimeout(function() { - equal( h2.css("fontSize"), "20px", "Text size unchanged with children: undefined" ); + equal( h2.css("fontSize"), "20px", "Text size unchanged during animate with children: undefined" ); }, mid); }}); - setTimeout(function() { - notPresent( h2.css("fontSize"), ["10px","20px"], "Font size is neither endpoint when in middle."); - }, mid); }); })(jQuery); |