Bug 1292447: part 6 - Update test_computed_style.html. draft
authorAstley Chen <aschen@mozilla.com>
Mon, 03 Oct 2016 18:14:20 +0800
changeset 420157 f2f1ea9ee91793ead301241e48674f293a5a77a0
parent 420156 60aa1c28647a172b850f0abc30ff6553ed8afd2e
child 420158 dfd92ba7a37938872c58055a0afe586e5ab9f19a
push id31116
push useraschen@mozilla.com
push dateMon, 03 Oct 2016 15:25:03 +0000
bugs1292447
milestone52.0a1
Bug 1292447: part 6 - Update test_computed_style.html. MozReview-Commit-ID: 3Y3jFp8ZBz
layout/style/test/test_computed_style.html
--- a/layout/style/test/test_computed_style.html
+++ b/layout/style/test/test_computed_style.html
@@ -30,31 +30,31 @@ var noframe_container = document.getElem
   p.style.borderBottomLeftRadius = "1.5625% 3.125%" /* 1/64 1/32 == 4px 4px */
   p.style.MozOutlineRadiusTopleft = "1.5625%"; /* 1/64 == 4px 2px */
   p.style.MozOutlineRadiusTopright = "5px";
   p.style.MozOutlineRadiusBottomright = "5px 3px";
   p.style.MozOutlineRadiusBottomleft = "1.5625% 3.125%" /* 1/64 1/32 == 4px 4px */
   var cs = getComputedStyle(p, "");
 
   frame_container.appendChild(p);
-  is(cs.borderTopLeftRadius, "4px 2px",
+  is(cs.borderTopLeftRadius, "1.5625%",
      "computed value of % border-radius, with frame");
   is(cs.borderTopRightRadius, "5px",
      "computed value of px border-radius, with frame");
   is(cs.borderBottomRightRadius, "5px 3px",
      "computed value of px border-radius, with frame");
-  is(cs.borderBottomLeftRadius, "4px",
+  is(cs.borderBottomLeftRadius, "1.5625% 3.125%",
      "computed value of % border-radius, with frame");
-  is(cs.MozOutlineRadiusTopleft, "4px 2px",
+  is(cs.MozOutlineRadiusTopleft, "1.5625%",
      "computed value of % outline-radius, with frame");
   is(cs.MozOutlineRadiusTopright, "5px",
      "computed value of px outline-radius, with frame");
   is(cs.MozOutlineRadiusBottomright, "5px 3px",
      "computed value of px outline-radius, with frame");
-  is(cs.MozOutlineRadiusBottomleft, "4px",
+  is(cs.MozOutlineRadiusBottomleft, "1.5625% 3.125%",
      "computed value of % outline-radius, with frame");
 
   noframe_container.appendChild(p);
   is(cs.borderTopLeftRadius, "1.5625%",
      "computed value of % border-radius, without frame");
   is(cs.borderTopRightRadius, "5px",
      "computed value of px border-radius, without frame");
   is(cs.borderBottomRightRadius, "5px 3px",
@@ -68,67 +68,69 @@ var noframe_container = document.getElem
   is(cs.MozOutlineRadiusBottomright, "5px 3px",
      "computed value of px outline-radius, without frame");
   is(cs.MozOutlineRadiusBottomleft, "1.5625% 3.125%",
      "computed value of % outline-radius, without frame");
 
   p.parentNode.removeChild(p);
 })();
 
-(function test_bug_595651() {
-  // Test that clamping of border-radius is reflected in computed style.
+(function test_bug_1292447() {
+  // Was for bug 595651 which tests that clamping of border-radius
+  // is reflected in computed style.
+  // For compatibility issue, resolved value is computed value now.
   var p = document.createElement("p");
   p.setAttribute("style", "width: 190px; height: 90px; border: 5px solid;");
   p.style.borderRadius = "1000px";
   var cs = getComputedStyle(p, "");
 
   frame_container.appendChild(p);
-  is(cs.borderTopLeftRadius, "50px",
+  is(cs.borderTopLeftRadius, "1000px",
      "computed value of clamped border radius (top left)");
-  is(cs.borderTopRightRadius, "50px",
+  is(cs.borderTopRightRadius, "1000px",
      "computed value of clamped border radius (top right)");
-  is(cs.borderBottomRightRadius, "50px",
+  is(cs.borderBottomRightRadius, "1000px",
      "computed value of clamped border radius (bottom right)");
-  is(cs.borderBottomLeftRadius, "50px",
+  is(cs.borderBottomLeftRadius, "1000px",
      "computed value of clamped border radius (bottom left)");
 
   p.style.overflowY = "scroll";
-  is(cs.borderTopLeftRadius, "50px",
+  is(cs.borderTopLeftRadius, "1000px",
      "computed value of clamped border radius (top left, overflow-y)");
   // Fennec doesn't have scrollbars for overflow:scroll content
   if (p.clientWidth == p.offsetWidth - 10) {
-    is(cs.borderTopRightRadius, "50px",
+    is(cs.borderTopRightRadius, "1000px",
        "computed value of border radius (top right, overflow-y)");
-    is(cs.borderBottomRightRadius, "50px",
+    is(cs.borderBottomRightRadius, "1000px",
        "computed value of border radius (bottom right, overflow-y)");
   } else {
-    is(cs.borderTopRightRadius, "5px",
+    is(cs.borderTopRightRadius, "1000px",
        "computed value of clamped border radius (top right, overflow-y)");
-    is(cs.borderBottomRightRadius, "5px",
+    is(cs.borderBottomRightRadius, "1000px",
        "computed value of clamped border radius (bottom right, overflow-y)");
   }
-  is(cs.borderBottomLeftRadius, "50px",
+  is(cs.borderBottomLeftRadius, "1000px",
      "computed value of clamped border radius (bottom left, overflow-y)");
 
   p.style.overflowY = "hidden";
   p.style.overflowX = "scroll";
-  is(cs.borderTopLeftRadius, "50px",
+  is(cs.borderTopLeftRadius, "1000px",
      "computed value of clamped border radius (top left, overflow-x)");
-  is(cs.borderTopRightRadius, "50px",
+  is(cs.borderTopRightRadius, "1000px",
      "computed value of clamped border radius (top right, overflow-x)");
   // Fennec doesn't have scrollbars for overflow:scroll content
   if (p.clientHeight == p.offsetHeight - 10) {
-    is(cs.borderBottomRightRadius, "50px",
+    is(cs.borderBottomRightRadius, "1000px",
        "computed value of border radius (bottom right, overflow-x)");
-    is(cs.borderBottomLeftRadius, "50px",
+    is(cs.borderBottomLeftRadius, "1000px",
        "computed value of  border radius (bottom left, overflow-x)");
   } else {
-    is(cs.borderBottomRightRadius, "5px",
+    is(cs.borderBottomRightRadius, "1000px",
        "computed value of clamped border radius (bottom right, overflow-x)");
-    is(cs.borderBottomLeftRadius, "5px",
+    is(cs.borderBottomLeftRadius, "1000px",
        "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