Bug 1294966 - Part 5. Add test cases for get bbox of svg elements with negative width or height. draft
authorcku <cku@mozilla.com>
Wed, 06 Sep 2017 22:39:35 +0800
changeset 660005 747ec2f8cca77153ebd67a9d12d8f446c0e08b62
parent 660004 25e6a4487fc793047cb04d306e8fcaf963ef6dd6
child 730120 91335b0f1aa7db567be06d677e578a359936bb08
push id78273
push userbmo:cku@mozilla.com
push dateWed, 06 Sep 2017 14:43:42 +0000
bugs1294966
milestone57.0a1
Bug 1294966 - Part 5. Add test cases for get bbox of svg elements with negative width or height. MozReview-Commit-ID: LvrV6t0Q3qo
dom/svg/test/bbox-helper.svg
dom/svg/test/test_bbox.xhtml
--- a/dom/svg/test/bbox-helper.svg
+++ b/dom/svg/test/bbox-helper.svg
@@ -35,11 +35,13 @@
     <circle cx="100" cy="100" r="5"/>
     <g/>
   </g>
   <use x="100" y="100" id="use_v" href="#v"/>
   <use x="100" y="100" id="use_h" href="#h"/>
   <use x="100" y="100" id="use_e" href="#e"/>
   <circle id="empty_circle_1" cx="50" cy="30" r="0"/>
   <circle id="empty_circle_2" cx="50" cy="30" r="0" stroke-width="10"/>
+  <circle id="empty_circle_3" cx="50" cy="30" r="-10"/>
   <rect id="empty_rect_1" x="40" y="20" width="0" height="10"/>
   <rect id="empty_rect_2" x="40" y="20" width="0" height="10" stroke-width="10"/>
+  <rect id="empty_rect_3" x="40" y="20" width="-10" height="10"/>
 </svg>
--- a/dom/svg/test/test_bbox.xhtml
+++ b/dom/svg/test/test_bbox.xhtml
@@ -62,18 +62,20 @@ function run()
   checkBBox("v", 95, 45, 10, 155, 0.001);
   checkBBox("h", 195, 45, 105, 55, 0.001);
   checkBBox("e", 95, 95, 10, 10, 0.001);
   checkBBox("use_v", 195, 145, 10, 155, 0.001);
   checkBBox("use_h", 295, 145, 105, 55, 0.001);
   checkBBox("use_e", 195, 195, 10, 10, 0.001);
   checkBBox("empty_circle_1", 50, 30, 0, 0, 0.0);
   checkBBox("empty_circle_2", 50, 30, 0, 0, 0.0);
+  checkBBox("empty_circle_3", 50, 30, 0, 0, 0.0);
   checkBBox("empty_rect_1", 40, 20, 0, 10, 0.0);
   checkBBox("empty_rect_2", 40, 20, 0, 10, 0.0);
+  checkBBox("empty_rect_3", 40, 20, 0, 10, 0.0);
   SimpleTest.finish();
 }
 
 window.addEventListener("load", run);
 
 //]]></script>
 </pre>
 </body>