aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2011-10-22 16:08:14 -0400
committertimmywil <timmywillisn@gmail.com>2011-10-22 16:08:14 -0400
commite502012c0f8e7604eaabe4065ba769af04eec180 (patch)
tree59f60182e4a1fca47cc6364e6a20eb11fe29fda6 /test
parente1a5d3ebfbf963f373d8c6aa2fbec36bacc200be (diff)
downloadjquery-e502012c0f8e7604eaabe4065ba769af04eec180.tar.gz
jquery-e502012c0f8e7604eaabe4065ba769af04eec180.zip
Landing pull request 553. Fallback to elem.style for disconnected nodes in width/height retrieval. Fixes #8388.
More Details: - https://github.com/jquery/jquery/pull/553 - http://bugs.jquery.com/ticket/10254 - http://bugs.jquery.com/ticket/8388
Diffstat (limited to 'test')
-rw-r--r--test/unit/css.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/unit/css.js b/test/unit/css.js
index 78c6def61..7e9509593 100644
--- a/test/unit/css.js
+++ b/test/unit/css.js
@@ -435,7 +435,7 @@ test(":visible selector works properly on children with a hidden parent (bug #45
test("internal ref to elem.runtimeStyle (bug #7608)", function () {
expect(1);
var result = true;
-
+
try {
jQuery("#foo").css( { width: "0%" } ).css("width");
} catch (e) {
@@ -476,7 +476,7 @@ test("widows & orphans #8936", function () {
var $p = jQuery("<p>").appendTo("#qunit-fixture");
if ( "widows" in $p[0].style ) {
- expect(4);
+ expect(4);
$p.css({
widows: 0,
orphans: 0
@@ -502,6 +502,15 @@ test("widows & orphans #8936", function () {
$p.remove();
});
+test("can't get css for disconnected in IE<9, see #10254 and #8388", function() {
+ expect( 2 );
+ var span = jQuery( "<span/>" ).css( "background-image", "url(http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif)" );
+ equal( span.css( "background-image" ), "url(http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif)", "can't get background-image in IE<9, see #10254" );
+
+ var div = jQuery( "<div/>" ).css( "top", 10 );
+ equal( div.css( "top" ), "10px", "can't get top in IE<9, see #8388" );
+});
+
test("Do not append px to 'fill-opacity' #9548", 1, function() {
var $div = jQuery("<div>").appendTo("#qunit-fixture");
@@ -510,4 +519,4 @@ test("Do not append px to 'fill-opacity' #9548", 1, function() {
equal( jQuery(this).css("fill-opacity"), 1, "Do not append px to 'fill-opacity'");
});
-});
+}); \ No newline at end of file