Bug 675711 - test_computed_style.html fails partly on Fennec because of lack of scrollbars. r=dbaron, a=test-only
authorMartijn Wargers <martijn.martijn@gmail.com>
Thu, 04 Aug 2011 14:10:27 -0400
changeset 73862 fbf02dd1803ea40e3529cf970282f838c63ce439
parent 73861 3a754c19cacd985c422665be1e3f5ddd16c71fd2
child 73863 64ca7770ab496d0c354c7704532fa54c335e5282
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersdbaron, test-only
bugs675711
milestone8.0a1
Bug 675711 - test_computed_style.html fails partly on Fennec because of lack of scrollbars. r=dbaron, a=test-only
layout/style/test/test_computed_style.html
--- a/layout/style/test/test_computed_style.html
+++ b/layout/style/test/test_computed_style.html
@@ -89,33 +89,49 @@ var noframe_container = document.getElem
   is(cs.borderBottomRightRadius, "50px",
      "computed value of clamped border radius (bottom right)");
   is(cs.borderBottomLeftRadius, "50px",
      "computed value of clamped border radius (bottom left)");
 
   p.style.overflowY = "scroll";
   is(cs.borderTopLeftRadius, "50px",
      "computed value of clamped border radius (top left, overflow-y)");
-  is(cs.borderTopRightRadius, "5px",
-     "computed value of clamped border radius (top right, overflow-y)");
-  is(cs.borderBottomRightRadius, "5px",
-     "computed value of clamped border radius (bottom right, overflow-y)");
+  // Fennec doesn't have scrollbars for overflow:scroll content
+  if (p.clientWidth == p.offsetWidth - 10) {
+    is(cs.borderTopRightRadius, "50px",
+       "computed value of border radius (top right, overflow-y)");
+    is(cs.borderBottomRightRadius, "50px",
+       "computed value of border radius (bottom right, overflow-y)");
+  } else {
+    is(cs.borderTopRightRadius, "5px",
+       "computed value of clamped border radius (top right, overflow-y)");
+    is(cs.borderBottomRightRadius, "5px",
+       "computed value of clamped border radius (bottom right, overflow-y)");
+  }
   is(cs.borderBottomLeftRadius, "50px",
      "computed value of clamped border radius (bottom left, overflow-y)");
 
   p.style.overflowY = "hidden";
   p.style.overflowX = "scroll";
   is(cs.borderTopLeftRadius, "50px",
      "computed value of clamped border radius (top left, overflow-x)");
   is(cs.borderTopRightRadius, "50px",
      "computed value of clamped border radius (top right, overflow-x)");
-  is(cs.borderBottomRightRadius, "5px",
-     "computed value of clamped border radius (bottom right, overflow-x)");
-  is(cs.borderBottomLeftRadius, "5px",
-     "computed value of clamped border radius (bottom left, overflow-x)");
+  // Fennec doesn't have scrollbars for overflow:scroll content
+  if (p.clientHeight == p.offsetHeight - 10) {
+    is(cs.borderBottomRightRadius, "50px",
+       "computed value of border radius (bottom right, overflow-x)");
+    is(cs.borderBottomLeftRadius, "50px",
+       "computed value of  border radius (bottom left, overflow-x)");
+  } else {
+    is(cs.borderBottomRightRadius, "5px",
+       "computed value of clamped border radius (bottom right, overflow-x)");
+    is(cs.borderBottomLeftRadius, "5px",
+       "computed value of clamped border radius (bottom left, overflow-x)");
+  }
 
   p.parentNode.removeChild(p);
 })();
 
 (function test_bug_647885_1() {
   // Test that various background-position styles round-trip correctly
   var backgroundPositions = [
     [ "0 0", "0px 0px", "unitless 0" ],