Bug 652991 - Part 11. Reftest for window.history.pushState. draft
authorcku <cku@mozilla.com>
Wed, 06 Jul 2016 22:52:46 +0800
changeset 395506 d1698085267a966b1efb11caee1fe6a3e3c96801
parent 395505 07fb15aef522c4d6c76e0342685369ddd8b27cfd
child 527019 dffea65a97c31a720e0da1f585fc2816fb1c7e6f
push id24801
push usercku@mozilla.com
push dateTue, 02 Aug 2016 14:45:11 +0000
bugs652991
milestone51.0a1
Bug 652991 - Part 11. Reftest for window.history.pushState. MozReview-Commit-ID: IzoMT5nuX10
layout/reftests/bugs/652991-1-ref.html
layout/reftests/bugs/652991-1a.html
layout/reftests/bugs/652991-1b.html
layout/reftests/bugs/652991-2-ref.html
layout/reftests/bugs/652991-2.html
layout/reftests/bugs/652991-3-ref.html
layout/reftests/bugs/652991-3.html
layout/reftests/bugs/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/652991-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+  <svg width="200" height="200">
+    <defs>
+      <pattern id="pattern-id" x="0" y="0" patternUnits="userSpaceOnUse" height="200" width="200">
+      <rect width="200" height="200" style="fill:rgb(0,0,255)" />
+      </pattern>
+    </defs>
+    <circle id="circle" cx="101" cy="101" r="50" fill="url(#pattern-id)" stroke="#000"/>
+  </svg>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/652991-1a.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+  <svg width="200" height="200">
+    <defs>
+      <pattern id="pattern-id" x="0" y="0" patternUnits="userSpaceOnUse" height="200" width="200">
+        <rect width="200" height="200" style="fill:rgb(0,0,255)" />
+      </pattern>
+    </defs>
+    <circle id="drawPath" cx="101" cy="101" r="50" fill="url(#pattern-id)" stroke="#000">
+    </circle>
+  </svg>
+  <script>
+  function doTest() {
+    window.history.pushState(null, "", "new-page");
+
+    drawPath.style.display = "none";
+    window.setTimeout(() => {
+      drawPath.style.display = "inline";
+      document.documentElement.removeAttribute('class');
+    }, 0);
+  }
+
+  drawPath = document.getElementById("drawPath");
+  window.addEventListener("MozReftestInvalidate", doTest);
+  </script>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/652991-1b.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+  <svg width="200" height="200">
+    <defs>
+      <pattern id="pattern-id" x="0" y="0" patternUnits="userSpaceOnUse" height="200" width="200">
+        <rect width="200" height="200" style="fill:rgb(0,0,255)" />
+      </pattern>
+    </defs>
+    <circle id="drawPath" cx="101" cy="101" r="50" style="fill: url(&quot;#pattern-id&quot;);" stroke="#000">
+    </circle>
+  </svg>
+  <script>
+  function doTest() {
+    window.history.pushState(null, "", "new-page");
+
+    drawPath.style.display = "none";
+    window.setTimeout(() => {
+      drawPath.style.display = "inline";
+      document.documentElement.removeAttribute('class');
+    }, 0);
+  }
+
+  drawPath = document.getElementById("drawPath");
+  window.addEventListener("MozReftestInvalidate", doTest);
+</script>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/652991-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<svg width="200" height="200">
+  <defs>
+    <clipPath id="myClip">
+      <circle cx="30" cy="30" r="20"/>
+      <circle cx="70" cy="70" r="20"/>
+    </clipPath>
+  </defs>
+  <rect x="10" y="10" width="100" height="100" clip-path="url(#myClip)"/>
+</svg>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/652991-2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+  <svg width="200" height="200">
+    <defs>
+      <clipPath id="myClip">
+        <circle cx="30" cy="30" r="20"/>
+        <circle cx="70" cy="70" r="20"/>
+      </clipPath>
+    </defs>
+    <rect id="drawPath" x="10" y="10" width="100" height="100" clip-path="url(#myClip)"/>
+  </svg>
+  <script>
+  function doTest() {
+    window.history.pushState(null, "", "new-page");
+
+    drawPath.style.display = "none";
+    window.setTimeout(() => {
+      drawPath.style.display = "inline";
+      document.documentElement.removeAttribute('class');
+    }, 0);
+  }
+
+  drawPath = document.getElementById("drawPath");
+  window.addEventListener("MozReftestInvalidate", doTest);
+  </script>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/652991-3-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<svg  width="200" height="200">
+  <defs>
+    <marker id="markerCircle" markerWidth="8" markerHeight="8" refX="5" refY="5">
+      <circle cx="5" cy="5" r="2" style="stroke: none; fill:#000000;"/>
+    </marker>
+  </defs>
+  <path id="drawPath" d="M10,10 L60,10 L110,10" style="stroke: #6666ff; stroke-width: 1px; fill: none; marker-start: url(#markerCircle); marker-mid: url(#markerCircle); marker-end: url(#markerCircle);"/>
+</svg>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/652991-3.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+  <svg width="200" height="200">
+  <defs>
+    <marker id="markerCircle" markerWidth="8" markerHeight="8" refX="5" refY="5">
+      <circle cx="5" cy="5" r="2" style="stroke: none; fill:#000000;"/>
+    </marker>
+  </defs>
+  <path id="drawPath" d="M10,10 L60,10 L110,10"
+        style="stroke: #6666ff; stroke-width: 1px; fill: none; marker-start: url(#markerCircle); marker-mid: url(#markerCircle);; marker-end: url(#markerCircle);"/>
+  </svg>
+  <script>
+  function doTest() {
+    window.history.pushState(null, "", "new-page");
+
+    drawPath.style.display = "none";
+    window.setTimeout(() => {
+      drawPath.style.display = "inline";
+      document.documentElement.removeAttribute('class');
+    }, 0);
+  }
+
+  drawPath = document.getElementById("drawPath");
+  window.addEventListener("MozReftestInvalidate", doTest);
+  </script>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1957,8 +1957,13 @@ fuzzy(100,2000) == 1239564.html 1239564-
 == 1272997-1.html 1272997-1-ref.html
 random-if(!winWidget) == 1273154-1.html 1273154-1-ref.html # depends on Windows font
 random-if(!winWidget) == 1273154-2.html 1273154-2-ref.html # depends on Windows font
 == 1274368-1.html 1274368-1-ref.html
 != 1276161-1a.html 1276161-1-notref.html
 != 1276161-1b.html 1276161-1-notref.html
 != 1276161-1a.html 1276161-1b.html
 == 1275411-1.html 1275411-1-ref.html
+
+HTTP == 652991-1a.html 652991-1-ref.html
+HTTP == 652991-1b.html 652991-1-ref.html
+HTTP == 652991-2.html 652991-2-ref.html
+HTTP == 652991-3.html 652991-3-ref.html