| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <title>SVG bounding boxes are valid for a zero-width or zero-height rect</title> | 4 <title>SVG bounding boxes are valid for a zero-width or zero-height rect</title> |
| 5 <svg height="0"> | 5 <svg height="0"> |
| 6 <rect height="100" width="0"/> | 6 <rect height="100" width="0"/> |
| 7 <rect height="0" width="100"/> | 7 <rect height="0" width="100"/> |
| 8 <rect vector-effect="non-scaling-stroke" height="100" width="0"/> | 8 <rect vector-effect="non-scaling-stroke" height="100" width="0"/> |
| 9 <rect vector-effect="non-scaling-stroke" height="0" width="100"/> | 9 <rect vector-effect="non-scaling-stroke" height="0" width="100"/> |
| 10 <rect rx="10" vector-effect="non-scaling-stroke" height="100" width="0"/> | 10 <rect rx="10" vector-effect="non-scaling-stroke" height="100" width="0"/> |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 new BBox(100, 200, 100, 0), | 58 new BBox(100, 200, 100, 0), |
| 59 ]; | 59 ]; |
| 60 var rects = document.getElementsByTagName('rect'); | 60 var rects = document.getElementsByTagName('rect'); |
| 61 for (var i = 0, length = rects.length; i < length; ++i) { | 61 for (var i = 0, length = rects.length; i < length; ++i) { |
| 62 var rectBBox = rects[i].getBBox(); | 62 var rectBBox = rects[i].getBBox(); |
| 63 test(function() { | 63 test(function() { |
| 64 assert_equals(rectBBox.x, expectedBoxes[i].x); | 64 assert_equals(rectBBox.x, expectedBoxes[i].x); |
| 65 assert_equals(rectBBox.y, expectedBoxes[i].y); | 65 assert_equals(rectBBox.y, expectedBoxes[i].y); |
| 66 assert_equals(rectBBox.width, expectedBoxes[i].width); | 66 assert_equals(rectBBox.width, expectedBoxes[i].width); |
| 67 assert_equals(rectBBox.height, expectedBoxes[i].height); | 67 assert_equals(rectBBox.height, expectedBoxes[i].height); |
| 68 }, 'Bounding box size ' + expectedBoxes[i]); | 68 }, 'Bounding box size, rect ' + (i + 1) + ', ' + expectedBoxes[i]); |
| 69 } | 69 } |
| 70 </script> | 70 </script> |
| OLD | NEW |