Bug 1473870 [wpt PR 11581] - SVG: Check that required properties are supported, a=testonly
authorChris Lilley <chris@w3.org>
Fri, 06 Jul 2018 18:17:15 +0000
changeset 425942 b00ffbdb9f42ac6199e7afc644beeda49883a503
parent 425941 07b13b18c38f749a1b63c3c64809837efc831495
child 425943 edadc109ab77aee3678428c3519dcb2b306d0879
push id34267
push userrgurzau@mozilla.com
push dateWed, 11 Jul 2018 22:05:21 +0000
treeherdermozilla-central@3aca103e4915 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1473870, 11581
milestone63.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 1473870 [wpt PR 11581] - SVG: Check that required properties are supported, a=testonly Automatic update from web-platform-testsMerge pull request #11581 from ewilligers/svg-required-properties SVG: Check that required properties are supported -- wpt-commits: 6fef2ebf20d323a7c50cff59728245057a02660a wpt-pr: 11581
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/svg/styling/required-properties.svg
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -379039,16 +379039,22 @@
     ]
    ],
    "svg/struct/UnknownElement/interface.svg": [
     [
      "/svg/struct/UnknownElement/interface.svg",
      {}
     ]
    ],
+   "svg/styling/required-properties.svg": [
+    [
+     "/svg/styling/required-properties.svg",
+     {}
+    ]
+   ],
    "svg/svg-in-svg/svg-in-svg-circular-filter-reference-crash.html": [
     [
      "/svg/svg-in-svg/svg-in-svg-circular-filter-reference-crash.html",
      {}
     ]
    ],
    "svg/types/elements/SVGGeometryElement-rect.svg": [
     [
@@ -619760,16 +619766,20 @@
   "svg/shapes/rect-04.svg": [
    "ad79ad2f821e30c3c016bb1e156c1fafb4a4decf",
    "reftest"
   ],
   "svg/struct/UnknownElement/interface.svg": [
    "42ecd7bc94a3379d920687c79c12e2d3c55b9e98",
    "testharness"
   ],
+  "svg/styling/required-properties.svg": [
+   "b59f278e8303641d5654420c89da3d1e64995458",
+   "testharness"
+  ],
   "svg/svg-in-svg/svg-in-svg-circular-filter-reference-crash.html": [
    "2976a4812636c4515cc5e2c633b17c47bee392ab",
    "testharness"
   ],
   "svg/types/elements/SVGGeometryElement-rect.svg": [
    "08237002915323f41dd5590ce4226f95ae79f285",
    "testharness"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/styling/required-properties.svg
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+     xmlns:h="http://www.w3.org/1999/xhtml">
+  <metadata>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/styling.html#RequiredProperties"/>
+    <h:link rel="help" href="https://svgwg.org/svg2-draft/propidx.html"/>
+    <h:meta name="assert" content="All required properties are supported"/>
+    <!-- Note: This test does not verify that the properties are actually applied to SVG rendering. -->
+  </metadata>
+  <g id="target"></g>
+  <h:script src="/resources/testharness.js"/>
+  <h:script src="/resources/testharnessreport.js"/>
+  <script><![CDATA[
+  var properties = [
+    // Properties listed in https://svgwg.org/svg2-draft/propidx.html
+    "alignment-baseline",
+    "baseline-shift",
+    "clip",
+    "clip-path",
+    "clip-rule",
+    "color",
+    "color-interpolation",
+    "color-rendering",
+    "cursor",
+    "direction",
+    "display",
+    "dominant-baseline",
+    "fill",
+    "fill-opacity",
+    "fill-rule",
+    "filter",
+    "flood-color",
+    "flood-opacity",
+    "font",
+    "font-family",
+    "font-size",
+    "font-size-adjust",
+    "font-stretch",
+    "font-style",
+    "font-variant",
+    "font-weight",
+    "glyph-orientation-vertical",
+    "image-rendering",
+    "letter-spacing",
+    "lighting-color",
+    "line-height",
+    "marker",
+    "marker-end",
+    "marker-mid",
+    "marker-start",
+    "mask",
+    "opacity",
+    "overflow",
+    "paint-order",
+    "pointer-events",
+    "shape-rendering",
+    "stop-color",
+    "stop-opacity",
+    "stroke",
+    "stroke-dasharray",
+    "stroke-dashoffset",
+    "stroke-linecap",
+    "stroke-linejoin",
+    "stroke-miterlimit",
+    "stroke-opacity",
+    "stroke-width",
+    "text-anchor",
+    "text-decoration",
+    "text-rendering",
+    "unicode-bidi",
+    "vector-effect",
+    "visibility",
+    "word-spacing",
+    "white-space",
+    "writing-mode",
+
+    // Properties listed in https://svgwg.org/svg2-draft/styling.html#RequiredProperties
+    "display",
+    "overflow",
+    "visibility",
+    "cursor",
+    "text-overflow",
+    "clip",
+    "clip-path",
+    "clip-rule",
+    "mask",
+    "color",
+    "opacity",
+    "color-interpolation-filters",
+    "filter",
+    "flood-color",
+    "flood-opacity",
+    "isolation",
+    "lighting-color",
+    "transform",
+    "transform-box",
+    "transform-origin",
+    "letter-spacing",
+    "text-align",
+    "text-align-all",
+    "text-align-last",
+    "text-indent",
+    "word-spacing",
+    "white-space",
+    "text-space-collapse",
+    "vertical-align",
+    "dominant-baseline",
+    "alignment-baseline",
+    "baseline-shift",
+    "direction",
+    "text-orientation",
+    "writing-mode",
+    "font",
+    "font-family",
+    "font-feature-settings",
+    "font-kerning",
+    "font-size",
+    "font-size-adjust",
+    "font-stretch",
+    "font-style",
+    "font-variant",
+    "font-variant-position",
+    "font-variant-ligatures",
+    "font-variant-caps",
+    "font-variant-numeric",
+    "font-variant-east-asian",
+    "font-weight",
+    "text-decoration",
+    "text-decoration-line",
+    "text-decoration-style",
+    "text-decoration-color"
+  ];
+  properties.sort();
+
+  var target = document.getElementById('target');
+  var previous = null;
+  for (var property of properties) {
+    if (property === previous)
+      continue; // Avoid duplicate test names
+    previous = property;
+
+    test(function() {
+      assert_true(target.style.hasOwnProperty(property));
+    }, 'Property "' + property + '" is supported');
+  }
+  ]]></script>
+</svg>