Bug 1245751 - Part 14: Add reftests. draft
authorBoris Chiou <boris.chiou@gmail.com>
Mon, 08 Aug 2016 14:39:54 +0800
changeset 400498 86af7f4ce9a088a5eea5cd404ff57d504f8b5335
parent 400497 18e6aba8b375c8df14604a81bbcbc0e668e4300e
child 400499 19d265ec0460cf106091f03afd4f95aafbe0d7dd
push id26164
push userbmo:boris.chiou@gmail.com
push dateSun, 14 Aug 2016 10:23:43 +0000
bugs1245751
milestone51.0a1
Bug 1245751 - Part 14: Add reftests. MANIFEST.json is revised automatically by --manifest-update. MozReview-Commit-ID: PZgNtDlaFk
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/svg/linking/reftests/href-a-element-attr-change.html
testing/web-platform/tests/svg/linking/reftests/href-a-element-ref.html
testing/web-platform/tests/svg/linking/reftests/href-feImage-element-ref.html
testing/web-platform/tests/svg/linking/reftests/href-feImage-element.html
testing/web-platform/tests/svg/linking/reftests/href-filter-element-ref.html
testing/web-platform/tests/svg/linking/reftests/href-filter-element.html
testing/web-platform/tests/svg/linking/reftests/href-gradient-element-ref.html
testing/web-platform/tests/svg/linking/reftests/href-gradient-element.html
testing/web-platform/tests/svg/linking/reftests/href-image-element-ref.html
testing/web-platform/tests/svg/linking/reftests/href-image-element.html
testing/web-platform/tests/svg/linking/reftests/href-pattern-element-ref.html
testing/web-platform/tests/svg/linking/reftests/href-pattern-element.html
testing/web-platform/tests/svg/linking/reftests/href-textPath-element-ref.html
testing/web-platform/tests/svg/linking/reftests/href-textPath-element.html
testing/web-platform/tests/svg/linking/reftests/href-use-element-ref.html
testing/web-platform/tests/svg/linking/reftests/href-use-element.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -37218,16 +37218,112 @@
             "references": [
               [
                 "/html/semantics/grouping-content/the-ol-element/reversed-1-ref.html",
                 "=="
               ]
             ],
             "url": "/html/semantics/grouping-content/the-ol-element/reversed-1d.html"
           }
+        ],
+        "svg/linking/reftests/href-a-element-attr-change.html": [
+          {
+            "path": "svg/linking/reftests/href-a-element-attr-change.html",
+            "references": [
+              [
+                "/svg/linking/reftests/href-a-element-ref.html",
+                "=="
+              ]
+            ],
+            "url": "/svg/linking/reftests/href-a-element-attr-change.html"
+          }
+        ],
+        "svg/linking/reftests/href-feImage-element.html": [
+          {
+            "path": "svg/linking/reftests/href-feImage-element.html",
+            "references": [
+              [
+                "/svg/linking/reftests/href-feImage-element-ref.html",
+                "=="
+              ]
+            ],
+            "url": "/svg/linking/reftests/href-feImage-element.html"
+          }
+        ],
+        "svg/linking/reftests/href-filter-element.html": [
+          {
+            "path": "svg/linking/reftests/href-filter-element.html",
+            "references": [
+              [
+                "/svg/linking/reftests/href-filter-element-ref.html",
+                "=="
+              ]
+            ],
+            "url": "/svg/linking/reftests/href-filter-element.html"
+          }
+        ],
+        "svg/linking/reftests/href-gradient-element.html": [
+          {
+            "path": "svg/linking/reftests/href-gradient-element.html",
+            "references": [
+              [
+                "/svg/linking/reftests/href-gradient-element-ref.html",
+                "=="
+              ]
+            ],
+            "url": "/svg/linking/reftests/href-gradient-element.html"
+          }
+        ],
+        "svg/linking/reftests/href-image-element.html": [
+          {
+            "path": "svg/linking/reftests/href-image-element.html",
+            "references": [
+              [
+                "/svg/linking/reftests/href-image-element-ref.html",
+                "=="
+              ]
+            ],
+            "url": "/svg/linking/reftests/href-image-element.html"
+          }
+        ],
+        "svg/linking/reftests/href-pattern-element.html": [
+          {
+            "path": "svg/linking/reftests/href-pattern-element.html",
+            "references": [
+              [
+                "/svg/linking/reftests/href-pattern-element-ref.html",
+                "=="
+              ]
+            ],
+            "url": "/svg/linking/reftests/href-pattern-element.html"
+          }
+        ],
+        "svg/linking/reftests/href-textPath-element.html": [
+          {
+            "path": "svg/linking/reftests/href-textPath-element.html",
+            "references": [
+              [
+                "/svg/linking/reftests/href-textPath-element-ref.html",
+                "=="
+              ]
+            ],
+            "url": "/svg/linking/reftests/href-textPath-element.html"
+          }
+        ],
+        "svg/linking/reftests/href-use-element.html": [
+          {
+            "path": "svg/linking/reftests/href-use-element.html",
+            "references": [
+              [
+                "/svg/linking/reftests/href-use-element-ref.html",
+                "=="
+              ]
+            ],
+            "url": "/svg/linking/reftests/href-use-element.html"
+          }
         ]
       },
       "testharness": {
         "2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html": [
           {
             "path": "2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html",
             "url": "/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html"
           }
@@ -37349,16 +37445,112 @@
           "references": [
             [
               "/html/semantics/grouping-content/the-ol-element/reversed-1-ref.html",
               "=="
             ]
           ],
           "url": "/html/semantics/grouping-content/the-ol-element/reversed-1d.html"
         }
+      ],
+      "svg/linking/reftests/href-a-element-attr-change.html": [
+        {
+          "path": "svg/linking/reftests/href-a-element-attr-change.html",
+          "references": [
+            [
+              "/svg/linking/reftests/href-a-element-ref.html",
+              "=="
+            ]
+          ],
+          "url": "/svg/linking/reftests/href-a-element-attr-change.html"
+        }
+      ],
+      "svg/linking/reftests/href-feImage-element.html": [
+        {
+          "path": "svg/linking/reftests/href-feImage-element.html",
+          "references": [
+            [
+              "/svg/linking/reftests/href-feImage-element-ref.html",
+              "=="
+            ]
+          ],
+          "url": "/svg/linking/reftests/href-feImage-element.html"
+        }
+      ],
+      "svg/linking/reftests/href-filter-element.html": [
+        {
+          "path": "svg/linking/reftests/href-filter-element.html",
+          "references": [
+            [
+              "/svg/linking/reftests/href-filter-element-ref.html",
+              "=="
+            ]
+          ],
+          "url": "/svg/linking/reftests/href-filter-element.html"
+        }
+      ],
+      "svg/linking/reftests/href-gradient-element.html": [
+        {
+          "path": "svg/linking/reftests/href-gradient-element.html",
+          "references": [
+            [
+              "/svg/linking/reftests/href-gradient-element-ref.html",
+              "=="
+            ]
+          ],
+          "url": "/svg/linking/reftests/href-gradient-element.html"
+        }
+      ],
+      "svg/linking/reftests/href-image-element.html": [
+        {
+          "path": "svg/linking/reftests/href-image-element.html",
+          "references": [
+            [
+              "/svg/linking/reftests/href-image-element-ref.html",
+              "=="
+            ]
+          ],
+          "url": "/svg/linking/reftests/href-image-element.html"
+        }
+      ],
+      "svg/linking/reftests/href-pattern-element.html": [
+        {
+          "path": "svg/linking/reftests/href-pattern-element.html",
+          "references": [
+            [
+              "/svg/linking/reftests/href-pattern-element-ref.html",
+              "=="
+            ]
+          ],
+          "url": "/svg/linking/reftests/href-pattern-element.html"
+        }
+      ],
+      "svg/linking/reftests/href-textPath-element.html": [
+        {
+          "path": "svg/linking/reftests/href-textPath-element.html",
+          "references": [
+            [
+              "/svg/linking/reftests/href-textPath-element-ref.html",
+              "=="
+            ]
+          ],
+          "url": "/svg/linking/reftests/href-textPath-element.html"
+        }
+      ],
+      "svg/linking/reftests/href-use-element.html": [
+        {
+          "path": "svg/linking/reftests/href-use-element.html",
+          "references": [
+            [
+              "/svg/linking/reftests/href-use-element-ref.html",
+              "=="
+            ]
+          ],
+          "url": "/svg/linking/reftests/href-use-element.html"
+        }
       ]
     }
   },
   "reftest_nodes": {
     "2dcontext/building-paths/canvas_complexshapes_arcto_001.htm": [
       {
         "path": "2dcontext/building-paths/canvas_complexshapes_arcto_001.htm",
         "references": [
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-a-element-attr-change.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html class="retest-wait">
+<meta charset="utf-8">
+<title>href - a element</title>
+<meta name="assert"
+      content="The a element should keep its link status after removing href " +
+              "if there is still xlink:href">
+<link rel="match" href="href-a-element-ref.html">
+<style>
+a:link rect {
+  fill: lime;
+}
+</style>
+<body>
+  <svg width="100" height="100" viewBox="0 0 100 100"
+       xmlns:xlink="http://www.w3.org/1999/xlink" onload="loaded();">
+    <a id="link" href="abc.html" xlink:href="def.html">
+      <rect width="100%" height="100%" fill="red"/>
+    </a>
+  </svg>
+</body>
+<script>
+  function loaded() {
+    document.getElementById('link').removeAttribute('href');
+    requestAnimationFrame(function() {
+      document.documentElement.classList.remove("reftest-wait");
+    });
+  }
+</script>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-a-element-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - a element reference</title>
+<body>
+  <svg width="100" height="100" viewBox="0 0 100 100">
+    <rect width="100%" height="100%" fill="lime"/>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-feImage-element-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - feImage element reference</title>
+<body>
+  <svg width="300" height="300" viewBox="0 0 300 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <filter id="Fitted" primitiveUnits="objectBoundingBox">
+      <feImage xlink:href="/images/rgrg-256x256.png"
+               x="0" y="0" width="100%" height="100%"
+               preserveAspectRatio="none"/>
+    </filter>
+    <rect x="20" y="25" width="100" height="110" filter="url(#Fitted)"/>
+    <rect x="20" y="25" width="100" height="110" fill="none" stroke="green"/>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-feImage-element.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - feImage element</title>
+<meta name="assert" content="The feImage element should accept href">
+<link rel="match" href="href-feImage-element-ref.html">
+<body>
+  <svg width="300" height="300" viewBox="0 0 300 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <filter id="Fitted" primitiveUnits="objectBoundingBox">
+      <feImage href="/images/rgrg-256x256.png"
+               xlink:href="/images/grgr-256x256.png"
+               x="0" y="0" width="100%" height="100%"
+               preserveAspectRatio="none"/>
+    </filter>
+    <rect x="20" y="25" width="100" height="110" filter="url(#Fitted)"/>
+    <rect x="20" y="25" width="100" height="110" fill="none" stroke="green"/>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-filter-element-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - filter element reference</title>
+<body>
+  <svg width="300" height="300" viewBox="0 0 300 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <filter id="blurMe">
+      <feGaussianBlur in="SourceGraphic" stdDeviation="5" />
+    </filter>
+    <circle cx="60" cy="60" r="50" fill="green" filter="url(#blurMe)" />
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-filter-element.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - filter element</title>
+<meta name="assert" content="The filter element should accept href">
+<link rel="match" href="href-filter-element-ref.html">
+<body>
+  <svg width="300" height="300" viewBox="0 0 300 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <filter id="blurMe">
+      <feGaussianBlur in="SourceGraphic" stdDeviation="5" />
+    </filter>
+    <filter id="dropShadow">
+      <feGaussianBlur in="SourceAlpha" stdDeviation="3" />
+      <feOffset dx="2" dy="4" />
+      <feMerge>
+        <feMergeNode />
+        <feMergeNode in="SourceGraphic" />
+      </feMerge>
+    </filter>
+    <filter id="Copied" href="#blurMe" xlink:href="#dropShadow">
+    </filter>
+    <circle cx="60" cy="60" r="50" fill="green" filter="url(#Copied)"/>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-gradient-element-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - gradient element reference</title>
+<body>
+  <svg width="300" height="300" viewBox="0 0 300 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <linearGradient id="MyGradient">
+      <stop offset="5%"  stop-color="green"/>
+      <stop offset="95%" stop-color="gold"/>
+    </linearGradient>
+    <rect fill="url(#MyGradient)" stroke="black" x="0" y="0"
+          width="100" height="100"/>
+
+    <radialGradient id="MyRadialGradient">
+      <stop offset="0%" stop-color="red"/>
+      <stop offset="100%" stop-color="blue"/>
+    </radialGradient>
+    <rect x="110" y="0" rx="15" ry="15" width="100" height="100"
+          fill="url(#MyRadialGradient)"/>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-gradient-element.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - gradient element</title>
+<meta name="assert" content="The gradient element should accept href">
+<link rel="match" href="href-gradient-element-ref.html">
+<body>
+  <svg width="300" height="300" viewBox="0 0 300 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <linearGradient id="MyGradient">
+      <stop offset="5%"  stop-color="green"/>
+      <stop offset="95%" stop-color="gold"/>
+    </linearGradient>
+    <linearGradient id="MyGradient2">
+      <stop offset="5%"  stop-color="red"/>
+      <stop offset="95%" stop-color="blue"/>
+    </linearGradient>
+    <linearGradient id="CopiedGradient" href="#MyGradient"
+                    xlink:href="#MyGradient2">
+    </linearGradient>
+    <rect fill="url(#CopiedGradient)" stroke="black" x="0" y="0"
+          width="100" height="100"/>
+
+    <radialGradient id="MyRadialGradient">
+      <stop offset="0%" stop-color="red"/>
+      <stop offset="100%" stop-color="blue"/>
+    </radialGradient>
+    <radialGradient id="CopiedRadialGradient" href="#MyRadialGradient"/>
+    <rect x="110" y="0" rx="15" ry="15" width="100" height="100"
+          fill="url(#CopiedRadialGradient)"/>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-image-element-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - image element reference</title>
+<body>
+  <svg width="300" height="300" viewBox="0 0 300 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <image xlink:href="/images/green.png" width="100px" height="100px"/>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-image-element.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - image element</title>
+<meta name="assert" content="The image should accept href">
+<link rel="match" href="href-image-element-ref.html">
+<body>
+  <svg width="300" height="300" viewBox="0 0 300 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <image href="/images/green.png" xlink:href="/images/red.png"
+           width="100px" height="100px"/>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-pattern-element-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - pattern element reference</title>
+<body>
+  <svg width="300" height="300" viewBox="0 0 300 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <pattern id="Pattern" x="0" y="0" width=".25" height=".25">
+      <rect x="0" y="0" width="25" height="25" fill="skyblue"/>
+      <circle cx="25" cy="25" r="20" fill="green" fill-opacity="0.5"/>
+    </pattern>
+    <rect fill="url(#Pattern)" stroke="black" x="0" y="0"
+          width="200" height="200"/>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-pattern-element.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - pattern element</title>
+<meta name="assert" content="The pattern element should accept href">
+<link rel="match" href="href-pattern-element-ref.html">
+<body>
+  <svg width="300" height="300" viewBox="0 0 300 300">
+    <pattern id="Pattern" x="0" y="0" width=".25" height=".25">
+      <rect x="0" y="0" width="25" height="25" fill="skyblue"/>
+      <circle cx="25" cy="25" r="20" fill="green" fill-opacity="0.5"/>
+    </pattern>
+    <pattern id="Pattern2" x="0" y="0" width=".25" height=".25">
+      <rect x="0" y="0" width="25" height="25" fill="skyblue"/>
+      <circle cx="25" cy="25" r="20" fill="red" fill-opacity="0.5"/>
+    </pattern>
+    <pattern id="CopiedPattern" href="#Pattern" xlink:href="#Pattern2">
+    </pattern>
+    <rect fill="url(#CopiedPattern)" stroke="black" x="0" y="0"
+          width="200" height="200"/>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-textPath-element-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - textPath element reference</title>
+<body>
+  <svg width="100%" height="100%" viewBox="0 0 1000 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <defs>
+      <path id="MyPath"
+            d="M 100 200
+               C 200 100 300   0 400 100
+               C 500 200 600 300 700 200
+               C 800 100 900 100 900 100" />
+    </defs>
+    <text font-family="Verdana" font-size="40">
+      <textPath xlink:href="#MyPath">
+        We go up, then we go down, then up again
+      </textPath>
+    </text>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-textPath-element.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - textPath element</title>
+<meta name="assert" content="The textPath element should accept href">
+<link rel="match" href="href-textPath-element-ref.html">
+<body>
+  <svg width="100%" height="100%" viewBox="0 0 1000 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <defs>
+      <path id="MyPath"
+            d="M 100 200
+               C 200 100 300   0 400 100
+               C 500 200 600 300 700 200
+               C 800 100 900 100 900 100" />
+      <path id="MyPath2" d="M 100 100 L 900 100" />
+    </defs>
+    <text font-family="Verdana" font-size="40">
+      <textPath href="#MyPath" xlink:href="#MyPath2">
+        We go up, then we go down, then up again
+      </textPath>
+    </text>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-use-element-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - use element reference</title>
+<body>
+  <svg style="display: none">
+    <rect id='refRect' style="fill: red" width="100" height="100" />
+  </svg>
+  <svg width="300" height="300" viewBox="0 0 300 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <use xlink:href="#refRect"/>
+  </svg>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/linking/reftests/href-use-element.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>href - use element</title>
+<meta name="assert" content="The use element should accept href">
+<link rel="match" href="href-use-element-ref.html">
+<body>
+  <svg style="display: none">
+    <circle id="refCircle" style="fill: orange" cx="50px" cy="50px" r="50px" />
+    <rect id='refRect' style="fill: red" width="100" height="100" />
+  </svg>
+  <svg width="300" height="300" viewBox="0 0 300 300"
+       xmlns:xlink="http://www.w3.org/1999/xlink">
+    <use href="#refRect" xlink:href="#refCircle"/>
+  </svg>
+</body>