From: jeresig Date: Mon, 14 Feb 2011 17:36:49 +0000 (-0500) Subject: Merge branch '8099' of https://github.com/rwldrn/jquery into rwldrn-8099 X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=bb9408516aa0fc8892f4e07a99b1a47bce06081b Merge branch '8099' of https://github.com/rwldrn/jquery into rwldrn-8099 --- bb9408516aa0fc8892f4e07a99b1a47bce06081b diff --cc test/unit/effects.js index a07c076,ce9c16c..7da8143 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@@ -141,27 -142,45 +141,39 @@@ test("Persist correct display value", f jQuery("#main").append('
foo
'); var $span = jQuery("#show-tests span"), - displayNone = $span.css("display"), - display = '', num = 0; - - $span.show(); - - display = $span.css("display"); + displayNone = $span.css("display"), + display = '', num = 0; - $span.hide(); + $span.show(); - $span.fadeIn(100, function() { + display = $span.css("display"); - equals($span.css("display"), display, "Expecting display: " + display); + $span.hide(); - $span.fadeOut(100, function () { - - equals($span.css("display"), displayNone, "Expecting display: " + displayNone); - - $span.fadeIn(100, function() { - - equals($span.css("display"), display, "Expecting display: " + display); - - start(); - }); - }); - }); + $span.fadeIn(100, function() { + equals($span.css("display"), display, "Expecting display: " + display); + $span.fadeOut(100, function () { + equals($span.css("display"), displayNone, "Expecting display: " + displayNone); + $span.fadeIn(100, function() { + equals($span.css("display"), display, "Expecting display: " + display); + start(); + }); + }); + }); }); + test("show() resolves correct default display #8099", function() { + expect(3); + var bug8099 = jQuery("").appendTo("#main"); + + equals( bug8099.css("display"), "none", "default display override for all tt" ); + equals( bug8099.show().css("display"), "inline", "Correctly resolves display:inline" ); + + bug8099.remove(); + + equals( jQuery("#foo").hide().show().css("display"), "block", "Correctly resolves display:block after hide/show" ); + }); + test("animate(Hash, Object, Function)", function() { expect(1); stop();