From 9ced0274653b8b17ceb6b0675e2ae05433dcf202 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Sun, 30 Sep 2012 17:41:42 -0400 Subject: Fix #12537, element.css('filter') returns undefined in IE9. Close gh-942. --- test/unit/css.js | 7 +++++++ test/unit/effects.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/unit/css.js b/test/unit/css.js index 30ce95fc9..be8597a62 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -782,6 +782,13 @@ test("certain css values of 'normal' should be convertable to a number, see #862 ok( jQuery.isNumeric( parseFloat( el.css("fontWeight") ) ), "css('fontWeight') not convertable to number, see #8627" ); }); +// only run this test in IE9 +if ( document.documentMode === 9 ) { + test( ".css('filter') returns a string in IE9, see #12537", 1, function() { + equal( jQuery("
").css("filter"), "progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFF, endColorstr=#ECECEC)", "IE9 returns the correct value from css('filter')." ); + }); +} + test( "cssHooks - expand", function() { expect( 15 ); var result, diff --git a/test/unit/effects.js b/test/unit/effects.js index 70b181461..a11af646a 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -1689,7 +1689,7 @@ asyncTest( "non-px animation handles non-numeric start (#11971)", 2, function() var foo = jQuery("#foo"), initial = foo.css("backgroundPositionX"); - if ( initial == null ) { + if ( !initial ) { expect(1); ok( true, "Style property not understood" ); start(); -- cgit v1.2.3