Index: LayoutTests/svg/custom/getBBox-ellipse-has-one-zero-value.html |
diff --git a/LayoutTests/svg/custom/getBBox-ellipse-has-one-zero-value.html b/LayoutTests/svg/custom/getBBox-ellipse-has-one-zero-value.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..966817473578f670e191f525fe4bfa35a45e4380 |
--- /dev/null |
+++ b/LayoutTests/svg/custom/getBBox-ellipse-has-one-zero-value.html |
@@ -0,0 +1,39 @@ |
+<!DOCTYPE HTML> |
+<html> |
+<!-- Test that svg bounding boxes are valid for a zero-width or zero-height ellipse --> |
+ <head> |
+ <script type="text/javascript"> |
+ function checkBoundingBoxHasZeroValue() { |
+ if (window.testRunner) |
+ window.testRunner.dumpAsText(); |
+ var ellipse1 = document.getElementById('ellipse1').getBBox(); |
+ var ellipse2 = document.getElementById('ellipse2').getBBox(); |
+ var ellipse3 = document.getElementById('ellipse3').getBBox(); |
+ var ellipse4 = document.getElementById('ellipse4').getBBox(); |
+ var results = "FAIL"; |
+ if (ellipse1.height == 100 && |
+ ellipse1.width == 0 && |
+ ellipse2.height == 0 && |
+ ellipse2.width == 100 && |
+ ellipse3.height == 100 && |
+ ellipse3.width == 0 && |
+ ellipse4.height == 0 && |
+ ellipse4.width == 100) |
+ results = "PASS"; |
+ document.body.innerHTML = results + ", bounding boxes sizes are (" + |
+ ellipse1.width + ", " + ellipse1.height + "), (" + |
+ ellipse2.width + ", " + ellipse2.height + "), (" + |
+ ellipse3.width + ", " + ellipse3.height + ") and (" + |
+ ellipse4.width + ", " + ellipse4.height + ")"; |
+ } |
+ </script> |
+ </head> |
+ <body onload="checkBoundingBoxHasZeroValue()"> |
+ <svg> |
+ <ellipse id="ellipse1" cx="50" cy="100" rx="0" ry="50"/> |
+ <ellipse id="ellipse2" cx="50" cy="100" rx="50" ry="0"/> |
+ <ellipse id="ellipse3" vector-effect="non-scaling-stroke" cx="50" cy="100" rx="0" ry="50"/> |
+ <ellipse id="ellipse4" vector-effect="non-scaling-stroke" cx="50" cy="100" rx="50" ry="0"/> |
+ </svg> |
+ <body> |
+</html> |