equal( Math.round( el.css("opacity") * 100 ), 20, "remove opacity override" );
});
-asyncTest( "Clearing a Cloned Element's Style Shouldn't Clear the Original Element's Style (#8908)", 16, function() {
+asyncTest( "Clearing a Cloned Element's Style Shouldn't Clear the Original Element's Style (#8908)", 24, function() {
var baseUrl = document.location.href.replace( /([^\/]*)$/, "" ),
styles = [{
name: "backgroundAttachment",
expected: [ "auto auto" ]
}];
- jQuery.each( styles, function(index, style) {
+ jQuery.each(styles, function( index, style ) {
var $clone, $clonedChildren,
$source = jQuery( "#firstp" ),
source = $source[ 0 ],
if ( source.style[ style.name ] === undefined ) {
ok( true, style.name + ": style isn't supported and therefore not an issue" );
ok( true );
+ ok( true );
return true;
}
$clonedChildren.css( style.name, "" );
window.setTimeout(function() {
+ notEqual( $clone.css( style.name ), style.value[ 0 ], "Cloned css was changed" );
+
ok( jQuery.inArray( $source.css( style.name ) !== -1, style.value ),
"Clearing clone.css() doesn't affect source.css(): " + style.name +
"; result: " + $source.css( style.name ) +
"reliableHiddenOffsets":true,
"ajax":true,
"cors":true,
- "doesNotIncludeMarginInBodyOffset":true
+ "doesNotIncludeMarginInBodyOffset":true,
+ "clearCloneStyle": true
};
} else if ( /opera.*version\/12\.1/i.test( userAgent ) ) {
expected = {
"reliableHiddenOffsets":true,
"ajax":true,
"cors":true,
- "doesNotIncludeMarginInBodyOffset":true
+ "doesNotIncludeMarginInBodyOffset":true,
+ "clearCloneStyle": true
};
} else if ( /msie 10\.0/i.test( userAgent ) ) {
expected = {
"reliableHiddenOffsets":true,
"ajax":true,
"cors":true,
- "doesNotIncludeMarginInBodyOffset":true
+ "doesNotIncludeMarginInBodyOffset":true,
+ "clearCloneStyle": false
};
} else if ( /msie 9\.0/i.test( userAgent ) ) {
expected = {
"reliableHiddenOffsets":true,
"ajax":true,
"cors":false,
- "doesNotIncludeMarginInBodyOffset":true
+ "doesNotIncludeMarginInBodyOffset":true,
+ "clearCloneStyle": false
};
} else if ( /msie 8\.0/i.test( userAgent ) ) {
expected = {
"reliableHiddenOffsets":false,
"ajax":true,
"cors":false,
- "doesNotIncludeMarginInBodyOffset":true
+ "doesNotIncludeMarginInBodyOffset":true,
+ "clearCloneStyle": true
};
} else if ( /msie 7\.0/i.test( userAgent ) ) {
expected = {
"shrinkWrapBlocks": false,
"submitBubbles": false,
"tbody": false,
- "style": false
+ "style": false,
+ "clearCloneStyle": true
};
} else if ( /msie 6\.0/i.test( userAgent ) ) {
expected = {
"reliableHiddenOffsets":false,
"ajax":true,
"cors":false,
- "doesNotIncludeMarginInBodyOffset":true
+ "doesNotIncludeMarginInBodyOffset":true,
+ "clearCloneStyle": true
};
} else if ( /5\.1\.1 safari/i.test( userAgent ) ) {
expected = {
"reliableHiddenOffsets":true,
"ajax":true,
"cors":true,
- "doesNotIncludeMarginInBodyOffset":true
+ "doesNotIncludeMarginInBodyOffset":true,
+ "clearCloneStyle": true
};
} else if ( /firefox/i.test( userAgent ) ) {
expected = {
"reliableHiddenOffsets":true,
"ajax":true,
"cors":true,
- "doesNotIncludeMarginInBodyOffset":true
+ "doesNotIncludeMarginInBodyOffset":true,
+ "clearCloneStyle": true
};
}
if ( expected ) {
test("Verify that the support tests resolve as expected per browser", function() {
- expect( 30 );
+ expect( 31 );
for ( var i in expected ) {
if ( jQuery.ajax || i !== "ajax" && i !== "cors" ) {