aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorrwldrn <waldron.rick@gmail.com>2011-01-31 14:31:15 -0500
committerrwldrn <waldron.rick@gmail.com>2011-01-31 14:31:15 -0500
commit0d2e4796dc97d3f9d6b5c1977e883b3ddf2f53d9 (patch)
treeefaabbe7191fd9b50d369a4592c1c3ec12352788 /test
parente0b1bb8e3d66db4166ac7ee2146903bae7ab1eb9 (diff)
downloadjquery-0d2e4796dc97d3f9d6b5c1977e883b3ddf2f53d9.tar.gz
jquery-0d2e4796dc97d3f9d6b5c1977e883b3ddf2f53d9.zip
Bug #8099 - Always restore to correct display value based on element's expected default display
Diffstat (limited to 'test')
-rw-r--r--test/data/testsuite.css3
-rw-r--r--test/unit/effects.js12
2 files changed, 15 insertions, 0 deletions
diff --git a/test/data/testsuite.css b/test/data/testsuite.css
index cffaaa46a..9ca2cd748 100644
--- a/test/data/testsuite.css
+++ b/test/data/testsuite.css
@@ -109,3 +109,6 @@ div#show-tests * { display: none; }
#nothiddendiv { font-size: 16px; }
#nothiddendivchild.em { font-size: 2em; }
#nothiddendivchild.prct { font-size: 150%; }
+
+/* 8099 changes to default styles are read correctly */
+tt { display: none; }
diff --git a/test/unit/effects.js b/test/unit/effects.js
index b1dd28840..ce9c16c8c 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -169,6 +169,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();