From c11becbb692f7707443eb2582543dfe96e8319e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?= Date: Tue, 21 Jan 2014 12:02:09 +0100 Subject: [PATCH] Tests: Blacklist one effects test in Chrome 31 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- test/unit/effects.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/test/unit/effects.js b/test/unit/effects.js index 318010b18..603041c4a 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -362,15 +362,29 @@ test("animate table-row width/height", function() { }); test("animate table-cell width/height", function() { - expect(3); - var td = jQuery( "#table" ) + // Support: Chrome 31. + // 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) { + expect(2); + } else { + expect(3); + } + + td = jQuery( "#table" ) .attr({ "cellspacing": 0, "cellpadding": 0, "border": 0 }) .html( "
" ) .find( "td" ); td.animate({ width: 10, height: 10 }, 100, function() { equal( jQuery( this ).css( "display" ), "table-cell", "display mode is correct" ); - equal( this.offsetWidth, 20, "width animated to shrink wrap point" ); + if (!chrome31) { + equal( this.offsetWidth, 20, "width animated to shrink wrap point" ); + } equal( this.offsetHeight, 20, "height animated to shrink wrap point" ); }); this.clock.tick( 100 ); -- 2.39.5