@@ -1386,6 +1386,47 @@ testIframe(
13861386 }
13871387) ;
13881388
1389+ ( function ( ) {
1390+ var supportsFractionalTrWidth ,
1391+ epsilon = 0.1 ,
1392+ table = jQuery ( "<table><tr></tr></table>" ) ,
1393+ tr = table . find ( "tr" ) ;
1394+
1395+ table
1396+ . appendTo ( "#qunit-fixture" )
1397+ . css ( {
1398+ width : "100.7px" ,
1399+ borderSpacing : 0
1400+ } ) ;
1401+
1402+ supportsFractionalTrWidth = Math . abs ( tr . width ( ) - 100.7 ) < epsilon ;
1403+
1404+ testIframe (
1405+ "Test computeStyleTests for hidden iframe" ,
1406+ "css/cssComputeStyleTests.html" ,
1407+ function ( assert , jQuery , window , document , initialHeight ) {
1408+ assert . expect ( 3 ) ;
1409+
1410+ assert . strictEqual ( initialHeight === 0 ? 20 : initialHeight , 20 ,
1411+ "hidden-frame content sizes should be zero or accurate" ) ;
1412+
1413+ window . parent . jQuery ( "#qunit-fixture-iframe" ) . css ( { "display" : "block" } ) ;
1414+ jQuery ( "#test" ) . width ( 600 ) ;
1415+ assert . strictEqual ( jQuery ( "#test" ) . width ( ) , 600 , "width should be 600" ) ;
1416+
1417+ if ( supportsFractionalTrWidth ) {
1418+ assert . ok (
1419+ Math . abs ( jQuery ( "#test-tr" ) . width ( ) - 100.7 ) < epsilon ,
1420+ "tr width should be fractional" ) ;
1421+ } else {
1422+ assert . strictEqual ( jQuery ( "#test-tr" ) . width ( ) , 101 , "tr width as expected" ) ;
1423+ }
1424+ } ,
1425+ undefined ,
1426+ { "display" : "none" }
1427+ ) ;
1428+ } ) ( ) ;
1429+
13891430QUnit . testUnlessIE ( "css('width') and css('height') should return fractional values for nodes in the document" , function ( assert ) {
13901431 assert . expect ( 2 ) ;
13911432
0 commit comments