File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -362,15 +362,29 @@ test("animate table-row width/height", function() {
362
362
} ) ;
363
363
364
364
test ( "animate table-cell width/height" , function ( ) {
365
- expect ( 3 ) ;
366
- var td = jQuery ( "#table" )
365
+ // Support: Chrome 31.
366
+ // Chrome 31 reports incorrect offsetWidth on a table cell with fixed width.
367
+ // This is fixed in Chrome 32 so let's just skip the failing test in Chrome 31.
368
+ // See https://code.google.com/p/chromium/issues/detail?id=290399
369
+ var td ,
370
+ chrome31 = navigator . userAgent . indexOf ( " Chrome/31." ) !== - 1 ;
371
+
372
+ if ( chrome31 ) {
373
+ expect ( 2 ) ;
374
+ } else {
375
+ expect ( 3 ) ;
376
+ }
377
+
378
+ td = jQuery ( "#table" )
367
379
. attr ( { "cellspacing" : 0 , "cellpadding" : 0 , "border" : 0 } )
368
380
. html ( "<tr><td style='width:42px;height:42px;padding:0;'><div style='width:20px;height:20px;'></div></td></tr>" )
369
381
. find ( "td" ) ;
370
382
371
383
td . animate ( { width : 10 , height : 10 } , 100 , function ( ) {
372
384
equal ( jQuery ( this ) . css ( "display" ) , "table-cell" , "display mode is correct" ) ;
373
- equal ( this . offsetWidth , 20 , "width animated to shrink wrap point" ) ;
385
+ if ( ! chrome31 ) {
386
+ equal ( this . offsetWidth , 20 , "width animated to shrink wrap point" ) ;
387
+ }
374
388
equal ( this . offsetHeight , 20 , "height animated to shrink wrap point" ) ;
375
389
} ) ;
376
390
this . clock . tick ( 100 ) ;
You can’t perform that action at this time.
0 commit comments