wpt / svg / path / parsing / path-length-invalid.tentative.svg

Status: PASS | Duration: 81ms | Subtests: 13/13 | Open test on wpt.live | wpt.fyi

Data from commit:
a50cb89 wpt: run reference-named files which are themselves tests (#836) (2026-09-03)

SubtestStatusMessage
e.style['path-length'] = "-1" should not set the property valuePASS
e.style['path-length'] = "-0.5" should not set the property valuePASS
e.style['path-length'] = "auto" should not set the property valuePASS
e.style['path-length'] = "1" should not set the property valuePASS
e.style['path-length'] = "0.5" should not set the property valuePASS
e.style['path-length'] = "100" should not set the property valuePASS
e.style['path-length'] = "1e2" should not set the property valuePASS
e.style['path-length'] = "-10px" should not set the property valuePASS
e.style['path-length'] = "10%" should not set the property valuePASS
e.style['path-length'] = "calc(10px + 5%)" should not set the property valuePASS
e.style['path-length'] = "calc(infinity)" should not set the property valuePASS
e.style['path-length'] = "1 2" should not set the property valuePASS
e.style['path-length'] = "none 1" should not set the property valuePASS

/svg/path/parsing/path-length-invalid.tentative.svg

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:h="http://www.w3.org/1999/xhtml">
  <title>SVG Path Properties: parsing path-length with invalid values</title>
  <metadata>
    <h:link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/paths.html#PathLengthProperty"/>
    <h:meta name="assert" content="path-length supports only the grammar 'none | &lt;length [0,∞]&gt;'."/>
  </metadata>
  <path id="target"/>
  <h:script src="/resources/testharness.js"/>
  <h:script src="/resources/testharnessreport.js"/>
  <h:script src="/css/support/parsing-testcommon.js"/>
  <script><![CDATA[

test_invalid_value("path-length", "-1");
test_invalid_value("path-length", "-0.5");
test_invalid_value("path-length", "auto");
test_invalid_value("path-length", "1");
test_invalid_value("path-length", "0.5");
test_invalid_value("path-length", "100");
test_invalid_value("path-length", "1e2");
test_invalid_value("path-length", "-10px");
test_invalid_value("path-length", "10%");
test_invalid_value("path-length", "calc(10px + 5%)");
test_invalid_value("path-length", "calc(infinity)");
test_invalid_value("path-length", "1 2");
test_invalid_value("path-length", "none 1");

  ]]></script>
</svg>