Bug 1460217 [wpt PR 10913] - Add basic tests for context fill and stroke., a=testonly
authorChris Lilley <chris@w3.org>
Fri, 06 Jul 2018 21:44:56 +0000
changeset 426000 cc4faf39114493ab7d0f46ef8ac6dcebff5dadde
parent 425999 fe0d3bf9cdd288cdb4914033e9887750d870e9a7
child 426001 cfb04c62b89c96f481867f993f57fb251e30baba
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
bugs1460217, 10913
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 1460217 [wpt PR 10913] - Add basic tests for context fill and stroke., a=testonly Automatic update from web-platform-testsMerge pull request #10913 from Tavmjong/paint-context Add basic tests for context fill and stroke. -- wpt-commits: e3173905464f0afb36163fa271ff01957eedec7c wpt-pr: 10913
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/svg/painting/reftests/paint-context-001-ref.svg
testing/web-platform/tests/svg/painting/reftests/paint-context-001.svg
testing/web-platform/tests/svg/painting/reftests/paint-context-002-ref.svg
testing/web-platform/tests/svg/painting/reftests/paint-context-002.svg
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -184200,16 +184200,40 @@
       [
        "/svg/linking/reftests/use-descendant-combinator-ref.html",
        "=="
       ]
      ],
      {}
     ]
    ],
+   "svg/painting/reftests/paint-context-001.svg": [
+    [
+     "/svg/painting/reftests/paint-context-001.svg",
+     [
+      [
+       "/svg/painting/reftests/paint-context-001-ref.svg",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "svg/painting/reftests/paint-context-002.svg": [
+    [
+     "/svg/painting/reftests/paint-context-002.svg",
+     [
+      [
+       "/svg/painting/reftests/paint-context-002-ref.svg",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "svg/path/bearing/absolute.svg": [
     [
      "/svg/path/bearing/absolute.svg",
      [
       [
        "/svg/path/bearing/absolute-ref.svg",
        "=="
       ]
@@ -297794,16 +297818,26 @@
      {}
     ]
    ],
    "svg/linking/scripted/testcommon.js": [
     [
      {}
     ]
    ],
+   "svg/painting/reftests/paint-context-001-ref.svg": [
+    [
+     {}
+    ]
+   ],
+   "svg/painting/reftests/paint-context-002-ref.svg": [
+    [
+     {}
+    ]
+   ],
    "svg/path/bearing/absolute-ref.svg": [
     [
      {}
     ]
    ],
    "svg/path/bearing/relative-ref.svg": [
     [
      {}
@@ -619988,16 +620022,32 @@
   "svg/linking/scripted/testScripts/externalScript2.js": [
    "6360f077307c4d532d06105ef2830876eb8642ee",
    "support"
   ],
   "svg/linking/scripted/testcommon.js": [
    "1367de727c679521d6b7237b97b86c5516e9363c",
    "support"
   ],
+  "svg/painting/reftests/paint-context-001-ref.svg": [
+   "d7e12d36f0b3168c677edf95ce401b3e1e5eccbe",
+   "support"
+  ],
+  "svg/painting/reftests/paint-context-001.svg": [
+   "d39d2988c685db29c1487e800f12e9ebea02ceac",
+   "reftest"
+  ],
+  "svg/painting/reftests/paint-context-002-ref.svg": [
+   "d625175aeaa329436b79b1a3c5d349b7fc4c18b7",
+   "support"
+  ],
+  "svg/painting/reftests/paint-context-002.svg": [
+   "510bd6b75e4e3688fd604fa7145c27587e63d6ff",
+   "reftest"
+  ],
   "svg/path/bearing/absolute-ref.svg": [
    "6ad5320a05fcc31fd2af98d2bbd0bd6fbc558daa",
    "support"
   ],
   "svg/path/bearing/absolute.svg": [
    "e1c8d4bca5ab9519936a96521006baa176296c27",
    "reftest"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/painting/reftests/paint-context-001-ref.svg
@@ -0,0 +1,44 @@
+<svg id="svg-root"
+  width="100%" height="100%" viewBox="0 0 480 360"
+  xmlns="http://www.w3.org/2000/svg"
+  xmlns:xlink="http://www.w3.org/1999/xlink"
+  xmlns:html="http://www.w3.org/1999/xhtml">
+  <g id="testmeta">
+    <title>Paint: 'paint-order'</title>
+    <html:link rel="author"
+          title="Tavmjong Bah"
+          href="http://tavmjong.free.fr"/>
+  </g>
+
+  <style id="test-font" type="text/css">
+    /* Standard Font (if needed). */
+    @font-face {
+      font-family: FreeSans;
+      src: url("../fonts/FreeSans.woff") format("woff");
+    }
+    text {
+      font-family: FreeSans, sans-serif;
+      text-anchor: middle;
+      fill: black;
+    }
+    #title {
+      font-size: 24px;
+    }
+    .label {
+      font-size: 18px;
+    }
+  </style>
+
+  <defs>
+    <rect id="rectangle" width="2" height="2" style="fill:lime;stroke:blue" />
+    <marker id="marker" style="overflow:visible" markerWidth="2" markerHeight="2" orient="auto" viewBox="0 0 2 2" refX="1" refY="1">
+      <use xlink:href="#rectangle"/>
+    </marker>
+    <path id="path" d="m -25,-25 0,50 50,0 0,-50 z"/>
+  </defs>
+
+  <g id="test-reference" font-size="16" style="fill:blue;stroke:lime;stroke-width:15px;marker:url(#marker)">
+    <path d="m 120,220 c 120,120 120,-120 240,0"/>
+  </g>
+
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/painting/reftests/paint-context-001.svg
@@ -0,0 +1,47 @@
+<svg id="svg-root"
+  width="100%" height="100%" viewBox="0 0 480 360"
+  xmlns="http://www.w3.org/2000/svg"
+  xmlns:xlink="http://www.w3.org/1999/xlink"
+  xmlns:html="http://www.w3.org/1999/xhtml">
+  <g id="testmeta">
+    <title>Paint: 'context-fill' and 'context-stroke'</title>
+    <html:link rel="author"
+          title="Tavmjong Bah"
+          href="http://tavmjong.free.fr"/>
+    <html:link rel="help"
+          href="https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint"/>
+    <html:link rel="match"  href="paint-context-001-ref.svg" />
+  </g>
+
+  <style id="test-font" type="text/css">
+    /* Standard Font (if needed). */
+    @font-face {
+      font-family: FreeSans;
+      src: url("../fonts/FreeSans.woff") format("woff");
+    }
+    text {
+      font-family: FreeSans, sans-serif;
+      text-anchor: middle;
+      fill: black;
+    }
+    #title {
+      font-size: 24px;
+    }
+    .label {
+      font-size: 18px;
+    }
+  </style>
+
+  <defs>
+    <rect id="rectangle" width="2" height="2" style="fill:context-stroke;stroke:context-fill" />
+    <marker id="marker" style="overflow:visible" markerWidth="2" markerHeight="2" orient="auto" viewBox="0 0 2 2" refX="1" refY="1">
+      <use xlink:href="#rectangle"/>
+    </marker>
+    <path id="path" d="m -25,-25 0,50 50,0 0,-50 z"/>
+  </defs>
+
+  <g id="test-body-content" font-size="16" style="fill:blue;stroke:lime;stroke-width:15px;marker:url(#marker)">
+    <path d="m 120,220 c 120,120 120,-120 240,0"/>
+  </g>
+
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/painting/reftests/paint-context-002-ref.svg
@@ -0,0 +1,41 @@
+<svg id="svg-root"
+  width="100%" height="100%" viewBox="0 0 480 360"
+  xmlns="http://www.w3.org/2000/svg"
+  xmlns:xlink="http://www.w3.org/1999/xlink"
+  xmlns:html="http://www.w3.org/1999/xhtml">
+  <g id="testmeta">
+    <title>Paint: 'paint-order'</title>
+    <html:link rel="author"
+          title="Tavmjong Bah"
+          href="http://tavmjong.free.fr"/>
+  </g>
+
+  <style id="test-font" type="text/css">
+    /* Standard Font (if needed). */
+    @font-face {
+      font-family: FreeSans;
+      src: url("../fonts/FreeSans.woff") format("woff");
+    }
+    text {
+      font-family: FreeSans, sans-serif;
+      text-anchor: middle;
+      fill: black;
+    }
+    #title {
+      font-size: 24px;
+    }
+    .label {
+      font-size: 18px;
+    }
+  </style>
+
+  <defs>
+    <rect id="rectangle" width="120" height="120" />
+  </defs>
+
+  <g id="test-reference" font-size="16" style="fill:lime;stroke:blue;stroke-width:15px">
+    <use xlink:href="#rectangle" transform="translate(60,120)"/>
+    <use xlink:href="#rectangle" transform="translate(300,120)" style="fill:lightblue;stroke:green"/>
+  </g>
+
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/painting/reftests/paint-context-002.svg
@@ -0,0 +1,44 @@
+<svg id="svg-root"
+  width="100%" height="100%" viewBox="0 0 480 360"
+  xmlns="http://www.w3.org/2000/svg"
+  xmlns:xlink="http://www.w3.org/1999/xlink"
+  xmlns:html="http://www.w3.org/1999/xhtml">
+  <g id="testmeta">
+    <title>Paint: 'context-fill' and 'context-stroke'</title>
+    <html:link rel="author"
+          title="Tavmjong Bah"
+          href="http://tavmjong.free.fr"/>
+    <html:link rel="help"
+          href="https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint"/>
+    <html:link rel="match"  href="paint-context-002-ref.svg" />
+  </g>
+
+  <style id="test-font" type="text/css">
+    /* Standard Font (if needed). */
+    @font-face {
+      font-family: FreeSans;
+      src: url("../fonts/FreeSans.woff") format("woff");
+    }
+    text {
+      font-family: FreeSans, sans-serif;
+      text-anchor: middle;
+      fill: black;
+    }
+    #title {
+      font-size: 24px;
+    }
+    .label {
+      font-size: 18px;
+    }
+  </style>
+
+  <defs>
+    <rect id="rectangle" width="120" height="120" style="fill:context-stroke;stroke:context-fill" />
+  </defs>
+
+  <g id="test-body-content" font-size="16" style="fill:blue;stroke:lime;stroke-width:15px">
+    <use xlink:href="#rectangle" transform="translate(60,120)"/>
+    <use xlink:href="#rectangle" transform="translate(300,120)" style="fill:green;stroke:lightblue"/>
+  </g>
+
+</svg>