Merge branch '8099' of https://github.com/rwldrn/jquery into rwldrn-8099
[jquery.git] / test / unit / effects.js
index 7fb1c7d..7da8143 100644 (file)
@@ -162,6 +162,18 @@ test("Persist correct display value", function() {
        });
 });
 
+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();
@@ -922,7 +934,7 @@ test("hide hidden elements, with animation (bug #7141)", function() {
 
 test("animate unit-less properties (#4966)", 2, function() {
        stop();
-       var div = jQuery( "<div style='z-index: 0'></div>" ).appendTo( "body" );
+       var div = jQuery( "<div style='z-index: 0; position: absolute;'></div>" ).appendTo( "#main" );
        equal( div.css( "z-index" ), "0", "z-index is 0" );
        div.animate({ zIndex: 2 }, function() {
                equal( div.css( "z-index" ), "2", "z-index is 2" );