aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2014-01-21 12:02:09 +0100
committerMichał Gołębiowski <m.goleb@gmail.com>2014-01-21 12:16:10 +0100
commit05c108ecbd72d6df36f7ae2ee934f3c3fb2b5db3 (patch)
tree71720faaf080c3299d993919e2785c2c57d6a8ca /test
parent0765822b31a64e15bc88bd5f98e01b8c67b93822 (diff)
downloadjquery-05c108ecbd72d6df36f7ae2ee934f3c3fb2b5db3.tar.gz
jquery-05c108ecbd72d6df36f7ae2ee934f3c3fb2b5db3.zip
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 c11becbb692f7707443eb2582543dfe96e8319e6)
Diffstat (limited to 'test')
-rw-r--r--test/unit/effects.js21
1 files changed, 17 insertions, 4 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js
index 3c89a3831..18a64908f 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -395,9 +395,20 @@ test("animate table-row width/height", function() {
});
test("animate table-cell width/height", function() {
- expect(3);
- var displayMode,
- 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 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 })
.html("<tr><td style='width:42px;height:42px;padding:0;'><div style='width:20px;height:20px;'></div></td></tr>")
.find("td");
@@ -407,7 +418,9 @@ test("animate table-cell width/height", function() {
td.animate({ width: 10, height: 10 }, 100, function() {
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" );
});
this.clock.tick( 100 );