Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

SVG Preview (Scaled)

Preview of https://raw.githubusercontent.com/mozilla-firefox/firefox/main/testing/web-platform/tests/svg/geometry/parsing/cx-attribute-valid.svg
<?xml version="1.0" encoding="UTF-8"?>
width="800px" height="800px">
<title>SVG Geometry Properties: parsing the cx presentation attribute with valid values</title>
<metadata>
<h:meta name="assert" content="the cx presentation attribute supports '&lt;length-percentage&gt; | &lt;number&gt;' (unlike the cx CSS property, which does not accept a bare number)."/>
</metadata>
<circle id="target"/>
<h:script src="/resources/testharness.js"/>
<h:script src="/resources/testharnessreport.js"/>
<h:script src="support/attribute-testcommon.js"/>
<script><![CDATA[
test_valid_attribute_value("cx", "0", 0);
test_valid_attribute_value("cx", "5", 5);
test_valid_attribute_value("cx", "-10", -10);
test_valid_attribute_value("cx", "5px", 5);
test_valid_attribute_value("cx", "-10px", -10);
test_valid_attribute_value("cx", "5%", 40, "5%");
]]></script>
</svg>