OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <!-- Simple test for | 2 <!-- Simple test for |
3 | 3 |
4 https://svgwg.org/svg2-draft/styling.html#WidthProperty | 4 https://svgwg.org/svg2-draft/styling.html#WidthProperty |
5 https://svgwg.org/svg2-draft/styling.html#HeightProperty | 5 https://svgwg.org/svg2-draft/styling.html#HeightProperty |
6 | 6 |
7 "For backwards compatibility, when the ‘width’ or ‘height’ | 7 "For backwards compatibility, when the 'width' or 'height' |
8 properties are specified as a presentation attributes, only the | 8 properties are specified as a presentation attributes, only the |
9 values that match the <length> production shall be mapped to | 9 values that match the <length> production shall be mapped to |
10 CSS. Any other value must be treated as invalid." --> | 10 CSS. Any other value must be treated as invalid." --> |
11 <script src="../../resources/testharness.js"></script> | 11 <script src="../../resources/testharness.js"></script> |
12 <script src="../../resources/testharnessreport.js"></script> | 12 <script src="../../resources/testharnessreport.js"></script> |
13 <span style="width:200px"> | 13 <span style="width:200px"> |
14 <svg id="svg"></svg> | 14 <svg id="svg"></svg> |
15 <svg width="400"> | 15 <svg width="400"> |
16 <foreignObject id="fO"> | 16 <foreignObject id="fO"> |
17 </foreignObject> | 17 </foreignObject> |
(...skipping 12 matching lines...) Expand all Loading... |
30 test(function() { | 30 test(function() { |
31 assert_equals(getWidth('#svg'), 0); | 31 assert_equals(getWidth('#svg'), 0); |
32 }, "Test width '" + invalid_width + "' on SVGSVGElement"); | 32 }, "Test width '" + invalid_width + "' on SVGSVGElement"); |
33 | 33 |
34 setWidth('#fO', invalid_width); | 34 setWidth('#fO', invalid_width); |
35 test(function() { | 35 test(function() { |
36 assert_equals(getWidth('#fO'), 0); | 36 assert_equals(getWidth('#fO'), 0); |
37 }, "Test width '" + invalid_width + "' on SVGForeignObject"); | 37 }, "Test width '" + invalid_width + "' on SVGForeignObject"); |
38 }); | 38 }); |
39 </script> | 39 </script> |
OLD | NEW |