mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Tests: Blacklist one effects test in 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
(cherry-picked from c11becbb69
)
This commit is contained in:
parent
0765822b31
commit
05c108ecbd
21
test/unit/effects.js
vendored
21
test/unit/effects.js
vendored
@ -395,9 +395,20 @@ test("animate table-row width/height", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("animate table-cell width/height", function() {
|
test("animate table-cell width/height", function() {
|
||||||
expect(3);
|
// Support: Chrome 31.
|
||||||
var displayMode,
|
// Chrome 31 reports incorrect offsetWidth on a table cell with fixed width.
|
||||||
td = jQuery("#table")
|
// 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 displayMode, 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 })
|
.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");
|
||||||
@ -407,7 +418,9 @@ test("animate table-cell width/height", function() {
|
|||||||
|
|
||||||
td.animate({ width: 10, height: 10 }, 100, function() {
|
td.animate({ width: 10, height: 10 }, 100, function() {
|
||||||
equal( jQuery(this).css("display"), displayMode, "display mode is correct" );
|
equal( jQuery(this).css("display"), displayMode, "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" );
|
equal( this.offsetHeight, 20, "height animated to shrink wrap point" );
|
||||||
});
|
});
|
||||||
this.clock.tick( 100 );
|
this.clock.tick( 100 );
|
||||||
|
Loading…
Reference in New Issue
Block a user