Bug 1505118 [wpt PR 13951] - SVG Geometry Properties - parsing, a=testonly
authorEric Willigers <ewilligers@users.noreply.github.com>
Thu, 15 Nov 2018 10:14:27 +0000
changeset 503404 66ecc165f23f185e58803c23a373dd386c09d260
parent 503403 2ac6661b912e72e9b931d87f23d35fc33cff0d0e
child 503405 c87924f9209f58431886a8367c3ffebf0747b254
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1505118, 13951
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1505118 [wpt PR 13951] - SVG Geometry Properties - parsing, a=testonly Automatic update from web-platform-testsSVG Geometry Properties - parsing (#13951) The properties cx cy r rx ry x y have the specified initial values, grammar and inheritance behavior. https://svgwg.org/svg2-draft/geometry.html Radii cannot be negative. Unitless lengths are not permitted. -- wpt-commits: bbaede37efaff6c5a2d592e3ce8071f379329812 wpt-pr: 13951
testing/web-platform/tests/svg/geometry/inheritance.svg
testing/web-platform/tests/svg/geometry/parsing/cx-invalid.svg
testing/web-platform/tests/svg/geometry/parsing/cx-valid.svg
testing/web-platform/tests/svg/geometry/parsing/cy-invalid.svg
testing/web-platform/tests/svg/geometry/parsing/cy-valid.svg
testing/web-platform/tests/svg/geometry/parsing/r-invalid.svg
testing/web-platform/tests/svg/geometry/parsing/r-valid.svg
testing/web-platform/tests/svg/geometry/parsing/rx-invalid.svg
testing/web-platform/tests/svg/geometry/parsing/rx-valid.svg
testing/web-platform/tests/svg/geometry/parsing/ry-invalid.svg
testing/web-platform/tests/svg/geometry/parsing/ry-valid.svg
testing/web-platform/tests/svg/geometry/parsing/x-invalid.svg
testing/web-platform/tests/svg/geometry/parsing/x-valid.svg
testing/web-platform/tests/svg/geometry/parsing/y-invalid.svg
testing/web-platform/tests/svg/geometry/parsing/y-valid.svg
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/inheritance.svg
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>Inheritance of geometry properties</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/>
+    <h:meta name="assert" content="None of the geometry properties inherit."/>
+    <h:meta name="assert" content="Properties have initial values according to spec."/>
+  </metadata>
+  <g id="container">
+      <g id="target"></g>
+  </g>
+  <h:script src="/resources/testharness.js"/>
+  <h:script src="/resources/testharnessreport.js"/>
+  <h:script src="/css/support/inheritance-testcommon.js"/>
+  <script><![CDATA[
+
+assert_not_inherited('cx', '0px', '-10px');
+assert_not_inherited('cy', '0px', '-10px');
+assert_not_inherited('r', '0px', '10px');
+assert_not_inherited('rx', 'auto', '10px');
+assert_not_inherited('ry', 'auto', '10px');
+assert_not_inherited('x', '0px', '-10px');
+assert_not_inherited('y', '0px', '-10px');
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/cx-invalid.svg
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing cx with invalid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#CX"/>
+    <h:meta name="assert" content="cx supports only the grammar '&lt;length-percentage&gt;'."/>
+  </metadata>
+  <g id="target"></g>
+  <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("cx", "10");
+test_invalid_value("cx", "auto");
+test_invalid_value("cx", "10px 20px");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/cx-valid.svg
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing cx with valid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#CX"/>
+    <h:meta name="assert" content="cx supports the full grammar '&lt;length-percentage&gt;'."/>
+  </metadata>
+  <g id="target"></g>
+  <h:script src="/resources/testharness.js"/>
+  <h:script src="/resources/testharnessreport.js"/>
+  <h:script src="/css/support/parsing-testcommon.js"/>
+  <script><![CDATA[
+
+test_valid_value("cx", "0", "0px");
+test_valid_value("cx", "-1px");
+test_valid_value("cx", "calc(2em + 3ex)");
+test_valid_value("cx", "4%");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/cy-invalid.svg
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing cy with invalid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#CY"/>
+    <h:meta name="assert" content="cy supports only the grammar '&lt;length-percentage&gt;'."/>
+  </metadata>
+  <g id="target"></g>
+  <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("cy", "10");
+test_invalid_value("cy", "auto");
+test_invalid_value("cy", "10px 20px");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/cy-valid.svg
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing cy with valid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#CY"/>
+    <h:meta name="assert" content="cy supports the full grammar '&lt;length-percentage&gt;'."/>
+  </metadata>
+  <g id="target"></g>
+  <h:script src="/resources/testharness.js"/>
+  <h:script src="/resources/testharnessreport.js"/>
+  <h:script src="/css/support/parsing-testcommon.js"/>
+  <script><![CDATA[
+
+test_valid_value("cy", "0", "0px");
+test_valid_value("cy", "-1px");
+test_valid_value("cy", "calc(2em + 3ex)");
+test_valid_value("cy", "4%");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/r-invalid.svg
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing r with invalid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#R"/>
+    <h:meta name="assert" content="r supports only the grammar '&lt;length-percentage&gt;'."/>
+  </metadata>
+  <g id="target"></g>
+  <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("r", "10");
+test_invalid_value("r", "auto");
+test_invalid_value("r", "10px 20px");
+test_invalid_value("r", "-1px");
+test_invalid_value("r", "-10%");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/r-valid.svg
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing r with valid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#R"/>
+    <h:meta name="assert" content="r supports the full grammar '&lt;length-percentage&gt;'."/>
+  </metadata>
+  <g id="target"></g>
+  <h:script src="/resources/testharness.js"/>
+  <h:script src="/resources/testharnessreport.js"/>
+  <h:script src="/css/support/parsing-testcommon.js"/>
+  <script><![CDATA[
+
+test_valid_value("r", "0", "0px");
+test_valid_value("r", "1px");
+test_valid_value("r", "calc(2em + 3ex)");
+test_valid_value("r", "4%");
+test_valid_value("r", "5vmin");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/rx-invalid.svg
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing rx with invalid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#RX"/>
+    <h:meta name="assert" content="rx supports only the grammar '&lt;length-percentage&gt; | auto'."/>
+  </metadata>
+  <g id="target"></g>
+  <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("rx", "10");
+test_invalid_value("rx", "none");
+test_invalid_value("rx", "10px 20px");
+test_invalid_value("rx", "-1px");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/rx-valid.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing rx with valid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#RX"/>
+    <h:meta name="assert" content="rx supports the full grammar '&lt;length-percentage&gt; | auto'."/>
+  </metadata>
+  <g id="target"></g>
+  <h:script src="/resources/testharness.js"/>
+  <h:script src="/resources/testharnessreport.js"/>
+  <h:script src="/css/support/parsing-testcommon.js"/>
+  <script><![CDATA[
+
+test_valid_value("rx", "auto");
+
+test_valid_value("rx", "0", "0px");
+test_valid_value("rx", "1px");
+test_valid_value("rx", "calc(2em + 3ex)");
+test_valid_value("rx", "4%");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/ry-invalid.svg
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing rx with invalid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#RY"/>
+    <h:meta name="assert" content="rx supports only the grammar '&lt;length-percentage&gt; | auto'."/>
+  </metadata>
+  <g id="target"></g>
+  <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("rx", "10");
+test_invalid_value("rx", "none");
+test_invalid_value("rx", "10px 20px");
+test_invalid_value("rx", "-1px");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/ry-valid.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing rx with valid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#RY"/>
+    <h:meta name="assert" content="rx supports the full grammar '&lt;length-percentage&gt; | auto'."/>
+  </metadata>
+  <g id="target"></g>
+  <h:script src="/resources/testharness.js"/>
+  <h:script src="/resources/testharnessreport.js"/>
+  <h:script src="/css/support/parsing-testcommon.js"/>
+  <script><![CDATA[
+
+test_valid_value("rx", "auto");
+
+test_valid_value("rx", "0", "0px");
+test_valid_value("rx", "1px");
+test_valid_value("rx", "calc(2em + 3ex)");
+test_valid_value("rx", "4%");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/x-invalid.svg
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing x with invalid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#X"/>
+    <h:meta name="assert" content="x supports only the grammar '&lt;length-percentage&gt;'."/>
+  </metadata>
+  <g id="target"></g>
+  <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("x", "10");
+test_invalid_value("x", "auto");
+test_invalid_value("x", "10px 20px");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/x-valid.svg
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing x with valid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#X"/>
+    <h:meta name="assert" content="x supports the full grammar '&lt;length-percentage&gt;'."/>
+  </metadata>
+  <g id="target"></g>
+  <h:script src="/resources/testharness.js"/>
+  <h:script src="/resources/testharnessreport.js"/>
+  <h:script src="/css/support/parsing-testcommon.js"/>
+  <script><![CDATA[
+
+test_valid_value("x", "0", "0px");
+test_valid_value("x", "-1px");
+test_valid_value("x", "calc(2em + 3ex)");
+test_valid_value("x", "4%");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/y-invalid.svg
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing y with invalid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#Y"/>
+    <h:meta name="assert" content="y supports only the grammar '&lt;length-percentage&gt;'."/>
+  </metadata>
+  <g id="target"></g>
+  <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("y", "10");
+test_invalid_value("y", "auto");
+test_invalid_value("y", "10px 20px");
+
+  ]]></script>
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/geometry/parsing/y-valid.svg
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml"
+     width="800px" height="8000px">
+  <title>SVG Geometry Properties: parsing y with valid values</title>
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#Y"/>
+    <h:meta name="assert" content="y supports the full grammar '&lt;length-percentage&gt;'."/>
+  </metadata>
+  <g id="target"></g>
+  <h:script src="/resources/testharness.js"/>
+  <h:script src="/resources/testharnessreport.js"/>
+  <h:script src="/css/support/parsing-testcommon.js"/>
+  <script><![CDATA[
+
+test_valid_value("y", "0", "0px");
+test_valid_value("y", "-1px");
+test_valid_value("y", "calc(2em + 3ex)");
+test_valid_value("y", "4%");
+
+  ]]></script>
+</svg>