Ajax, Effects: Disable Chrome 31 workarounds

This commit is contained in:
Michał Gołębiowski 2014-03-10 14:56:42 +01:00
parent a96d5bed58
commit b19d4d3450
2 changed files with 7 additions and 27 deletions

View File

@ -1532,17 +1532,10 @@ module( "ajax", {
} }
} ); } );
// Support: Chrome 31. testIframeWithCallback( "#14379 - jQuery.ajax() on unload", "ajax/onunload.html", function( status ) {
// Chrome 31 doesn't fire Ajax requests in beforeunload event handler. expect( 1 );
// There is no way for us to workaround it and it's been fixed in Chrome 32 strictEqual( status, "success", "Request completed" );
// so let's just blacklist Chrome 31 as long as it's in TestSwarm. });
// See https://code.google.com/p/chromium/issues/detail?id=321241
if ( navigator.userAgent.indexOf( " Chrome/31." ) === -1 ) {
testIframeWithCallback( "#14379 - jQuery.ajax() on unload", "ajax/onunload.html", function( status ) {
expect( 1 );
strictEqual( status, "success", "Request completed" );
});
}
ajaxTest( "#14683 - jQuery.ajax() - Exceptions thrown synchronously by xhr.send should be caught", 4, [ ajaxTest( "#14683 - jQuery.ajax() - Exceptions thrown synchronously by xhr.send should be caught", 4, [
{ {

19
test/unit/effects.js vendored
View File

@ -362,29 +362,16 @@ test("animate table-row width/height", function() {
}); });
test("animate table-cell width/height", function() { test("animate table-cell width/height", function() {
// Support: Chrome 31. expect(3);
// Chrome 31 reports incorrect offsetWidth on a table cell with fixed width.
// This is fixed in Chrome 32 so let's just skip the failing test in Chrome 31.
// See https://code.google.com/p/chromium/issues/detail?id=290399
var td,
chrome31 = navigator.userAgent.indexOf( " Chrome/31." ) !== -1;
if (chrome31) { var td = jQuery( "#table" )
expect(2);
} else {
expect(3);
}
td = jQuery( "#table" )
.attr({ "cellspacing": 0, "cellpadding": 0, "border": 0 }) .attr({ "cellspacing": 0, "cellpadding": 0, "border": 0 })
.html( "<tr><td style='width:42px;height:42px;padding:0;'><div style='width:20px;height:20px;'></div></td></tr>" ) .html( "<tr><td style='width:42px;height:42px;padding:0;'><div style='width:20px;height:20px;'></div></td></tr>" )
.find( "td" ); .find( "td" );
td.animate({ width: 10, height: 10 }, 100, function() { td.animate({ width: 10, height: 10 }, 100, function() {
equal( jQuery( this ).css( "display" ), "table-cell", "display mode is correct" ); equal( jQuery( this ).css( "display" ), "table-cell", "display mode is correct" );
if (!chrome31) { equal( this.offsetWidth, 20, "width animated to shrink wrap point" );
equal( this.offsetWidth, 20, "width animated to shrink wrap point" );
}
equal( this.offsetHeight, 20, "height animated to shrink wrap point" ); equal( this.offsetHeight, 20, "height animated to shrink wrap point" );
}); });
this.clock.tick( 100 ); this.clock.tick( 100 );