OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <title>getBBox tests</title> | 2 <title>getBBox tests</title> |
3 <script src=../../resources/testharness.js></script> | 3 <script src=../../resources/testharness.js></script> |
4 <script src=../../resources/testharnessreport.js></script> | 4 <script src=../../resources/testharnessreport.js></script> |
5 <div id="testcontainer"> | 5 <div id="testcontainer"> |
6 <svg width="1" height="1" visibility="hidden"> | 6 <svg width="1" height="1" visibility="hidden"> |
7 <g id="g1"> | 7 <g id="g1"> |
8 <polygon id="p1" fill="none" stroke="red" /> | 8 <polygon id="p1" fill="none" stroke="red" /> |
9 <rect id="r1" x="50" y="50" width="50" height="50" fill="green" /> | 9 <rect id="r1" x="50" y="50" width="50" height="50" fill="green" /> |
10 </g> | 10 </g> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 assert_rect_approx_equals(document.getElementById("g7").getBBox(), docum
ent.getElementById("r10").getBBox(), EPSILON); | 96 assert_rect_approx_equals(document.getElementById("g7").getBBox(), docum
ent.getElementById("r10").getBBox(), EPSILON); |
97 }, "polyline with no valid points doesn't contribute to parent bbox"); | 97 }, "polyline with no valid points doesn't contribute to parent bbox"); |
98 test(function() { | 98 test(function() { |
99 assert_rect_approx_equals(document.getElementById("p7").getBBox(), {"x":
40, "y":20, "width":0, "height":0 }, EPSILON); | 99 assert_rect_approx_equals(document.getElementById("p7").getBBox(), {"x":
40, "y":20, "width":0, "height":0 }, EPSILON); |
100 }, "getBBox on path with no height"); | 100 }, "getBBox on path with no height"); |
101 test(function() { | 101 test(function() { |
102 assert_rect_approx_equals(document.getElementById("g8").getBBox(), {"x":
40, "y":20, "width":60, "height":80 }, EPSILON); | 102 assert_rect_approx_equals(document.getElementById("g8").getBBox(), {"x":
40, "y":20, "width":60, "height":80 }, EPSILON); |
103 }, "path with no height should contribute to parent bbox"); | 103 }, "path with no height should contribute to parent bbox"); |
104 | 104 |
105 </script> | 105 </script> |
OLD | NEW |