Merge branch '8099' of https://github.com/rwldrn/jquery into rwldrn-8099
authorjeresig <jeresig@gmail.com>
Mon, 14 Feb 2011 17:36:49 +0000 (12:36 -0500)
committerjeresig <jeresig@gmail.com>
Mon, 14 Feb 2011 17:36:49 +0000 (12:36 -0500)
1  2 
src/effects.js
test/unit/effects.js

diff --cc src/effects.js
Simple merge
@@@ -141,27 -142,45 +141,39 @@@ test("Persist correct display value", f
        jQuery("#main").append('<div id="show-tests"><span style="position:absolute;">foo</span></div>');
  
        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("<tt/>").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();