Skip to content
Permalink
Browse files

We want to make sure that we only run the MSIE-specific filter tests …

…if opacity is explicitly not supported.
  • Loading branch information...
jeresig committed Oct 13, 2010
1 parent 73e4ef2 commit 8fb4d9af74d61e4bc55e615a21115c48bf5f65d9
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/unit/css.js
@@ -138,14 +138,14 @@ test("css(String, Object)", function() {
ok( success, "Setting RGBA values does not throw Error" );
});

if(jQuery.browser.msie) {
if ( !jQuery.support.opacity ) {
test("css(String, Object) for MSIE", function() {
// for #1438, IE throws JS error when filter exists but doesn't have opacity in it
jQuery('#foo').css("filter", "progid:DXImageTransform.Microsoft.Chroma(color='red');");
equals( jQuery('#foo').css('opacity'), '1', "Assert opacity is 1 when a different filter is set in IE, #1438" );

var filterVal = "progid:DXImageTransform.Microsoft.Alpha(opacity=30) progid:DXImageTransform.Microsoft.Blur(pixelradius=5)";
var filterVal2 = "progid:DXImageTransform.Microsoft.Alpha(opacity=100) progid:DXImageTransform.Microsoft.Blur(pixelradius=5)";
var filterVal2 = "progid:DXImageTransform.Microsoft.alpha(opacity=100) progid:DXImageTransform.Microsoft.Blur(pixelradius=5)";
var filterVal3 = "progid:DXImageTransform.Microsoft.Blur(pixelradius=5)";
jQuery('#foo').css("filter", filterVal);
equals( jQuery('#foo').css("filter"), filterVal, "css('filter', val) works" );

0 comments on commit 8fb4d9a

Please sign in to comment.
You can’t perform that action at this time.