mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Remove stranded support.js checks for oldIE.
This commit is contained in:
@@ -3,7 +3,7 @@ if ( jQuery.css ) {
|
||||
module("css", { teardown: moduleTeardown });
|
||||
|
||||
test("css(String|Hash)", function() {
|
||||
expect( 46 );
|
||||
expect( 45 );
|
||||
|
||||
equal( jQuery("#qunit-fixture").css("display"), "block", "Check for css property \"display\"" );
|
||||
|
||||
@@ -66,9 +66,6 @@ test("css(String|Hash)", function() {
|
||||
equal( jQuery("#empty").css("opacity"), "0", "Assert opacity is accessible via filter property set in stylesheet in IE" );
|
||||
jQuery("#empty").css({ "opacity": "1" });
|
||||
equal( jQuery("#empty").css("opacity"), "1", "Assert opacity is taken from style attribute when set vs stylesheet in IE with filters" );
|
||||
jQuery.support.opacity ?
|
||||
ok(true, "Requires the same number of tests"):
|
||||
ok( ~jQuery("#empty")[0].currentStyle.filter.indexOf("gradient"), "Assert setting opacity doesn't overwrite other filters of the stylesheet in IE" );
|
||||
|
||||
div = jQuery("#nothiddendiv");
|
||||
var child = jQuery("#nothiddendivchild");
|
||||
@@ -273,43 +270,6 @@ test( "css(Array)", function() {
|
||||
deepEqual( elem.css( expectedSingle ).css([ "width" ]), expectedSingle, "Getting single element array" );
|
||||
});
|
||||
|
||||
if ( !jQuery.support.opacity ) {
|
||||
test("css(String, Object) for MSIE", function() {
|
||||
expect( 5 );
|
||||
// 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');");
|
||||
equal( 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 filterVal3 = "progid:DXImageTransform.Microsoft.Blur(pixelradius=5)";
|
||||
jQuery("#foo").css("filter", filterVal);
|
||||
equal( jQuery("#foo").css("filter"), filterVal, "css('filter', val) works" );
|
||||
jQuery("#foo").css("opacity", 1);
|
||||
equal( jQuery("#foo").css("filter"), filterVal2, "Setting opacity in IE doesn't duplicate opacity filter" );
|
||||
equal( jQuery("#foo").css("opacity"), 1, "Setting opacity in IE with other filters works" );
|
||||
jQuery("#foo").css("filter", filterVal3).css("opacity", 1);
|
||||
ok( jQuery("#foo").css("filter").indexOf(filterVal3) !== -1, "Setting opacity in IE doesn't clobber other filters" );
|
||||
});
|
||||
|
||||
test( "Setting opacity to 1 properly removes filter: style (#6652)", function() {
|
||||
var rfilter = /filter:[^;]*/i,
|
||||
test = jQuery( "#t6652" ).css( "opacity", 1 ),
|
||||
test2 = test.find( "div" ).css( "opacity", 1 );
|
||||
|
||||
function hasFilter( elem ) {
|
||||
var match = rfilter.exec( elem[0].style.cssText );
|
||||
if ( match ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
expect( 2 );
|
||||
ok( !hasFilter( test ), "Removed filter attribute on element without filter in stylesheet" );
|
||||
ok( hasFilter( test2 ), "Filter attribute remains on element that had filter in stylesheet" );
|
||||
});
|
||||
}
|
||||
|
||||
test("css(String, Function)", function() {
|
||||
expect(3);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user