Bug 433616 tests. r+sr=roc
authorBoris Zbarsky <bzbarsky@mit.edu>
Sun, 28 Sep 2008 15:16:34 -0400
changeset 20089 06169936afdbcaa84e438b0244fe072fc579ac86
parent 20088 68fcaa71a5f2a4a36536da2f70d9a6988dfc3be9
child 20090 ffbab1273403cf939e0bd28b982f97c1564835cf
push idunknown
push userunknown
push dateunknown
bugs433616
milestone1.9.1b1pre
Bug 433616 tests. r+sr=roc
layout/reftests/svg-integration/clipPath-html-01-extref.xhtml
layout/reftests/svg-integration/clipPath-html-02-extref.xhtml
layout/reftests/svg-integration/clipPath-html-03-extref.xhtml
layout/reftests/svg-integration/clipPath-html-04-extref.xhtml
layout/reftests/svg-integration/clipPath-html-05-extref.xhtml
layout/reftests/svg-integration/clipPath-html-06-extref.xhtml
layout/reftests/svg-integration/filter-html-01-extref.xhtml
layout/reftests/svg-integration/mask-html-01-extref-01.xhtml
layout/reftests/svg-integration/mask-html-01-extref-02.xhtml
layout/reftests/svg-integration/mask-html-01-resource.svg
layout/reftests/svg-integration/reftest.list
layout/reftests/svg/reftest.list
layout/reftests/svg/use-01-extref-resource.svg
layout/reftests/svg/use-01-extref.svg
layout/svg/crashtests/crashtests.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg-integration/clipPath-html-01-extref.xhtml
@@ -0,0 +1,11 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/licenses/publicdomain/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+<body style="margin:0">
+  <div style="position:absolute; top:0; left:0; clip-path: url(clipPath-html-01.xhtml#c1); width:500px; height:500px; background:lime;"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg-integration/clipPath-html-02-extref.xhtml
@@ -0,0 +1,14 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/licenses/publicdomain/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+<body style="margin:0">
+  <div style="clip-path: url(clipPath-html-02.xhtml#c1); width:500px; height:200px; background:lime;">
+    <div style="height:200px;"/>
+    <div style="height:200px; background:blue;"/>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg-integration/clipPath-html-03-extref.xhtml
@@ -0,0 +1,14 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/licenses/publicdomain/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+<body style="margin:0">
+  <div style="clip-path: url(clipPath-html-03.xhtml#c1); width:500px; height:200px; background:lime;">
+    <div style="height:200px;"/>
+    <div style="height:200px; background:blue;"/>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg-integration/clipPath-html-04-extref.xhtml
@@ -0,0 +1,18 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/licenses/publicdomain/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+<head>
+<style>
+.unit { display:inline-block; width:100px; height:1px; }
+</style>
+</head>
+<body style="margin:0; width:350px; line-height:100px;">
+  <span class="unit"/><span class="unit"
+  /><span style="clip-path:url(clipPath-html-04.xhtml#c1); background:lime;"><span class="unit"/><span class="unit"
+  /></span>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg-integration/clipPath-html-05-extref.xhtml
@@ -0,0 +1,18 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/licenses/publicdomain/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+<head>
+<style>
+.unit { display:inline-block; width:100px; height:1px; }
+</style>
+</head>
+<body style="margin:0; width:350px; line-height:100px;">
+  <span class="unit"/><span class="unit"
+  /><span style="clip-path:url(clipPath-html-05.xhtml#c1); background:lime;"><span class="unit"/><span class="unit"
+  /></span>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg-integration/clipPath-html-06-extref.xhtml
@@ -0,0 +1,20 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/licenses/publicdomain/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+<head>
+<style>
+.unit { display:inline-block; width:100px; height:10px; }
+</style>
+</head>
+<body style="margin:0">
+  <span style="clip-path: url(clipPath-html-06.xhtml#c1);">
+    <span class="unit" style="background:lime;"></span>
+    <div style="height:200px; width:100px;"/>
+    <span class="unit" style="background:lime;"></span>
+  </span>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg-integration/filter-html-01-extref.xhtml
@@ -0,0 +1,11 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/licenses/publicdomain/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+<body style="margin:0">
+  <div style="background:lime; width:200px; height:200px; margin:50px; filter:url(filter-html-01.xhtml#f1)"/>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg-integration/mask-html-01-extref-01.xhtml
@@ -0,0 +1,11 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/licenses/publicdomain/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+<body style="margin:0">
+  <div style="mask: url(mask-html-01.xhtml#m1); width:500px; height:500px; background:lime;"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg-integration/mask-html-01-extref-02.xhtml
@@ -0,0 +1,11 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/licenses/publicdomain/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+<body style="margin:0">
+  <div style="mask: url(mask-html-01-resource.svg#m1); width:500px; height:500px; background:lime;"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg-integration/mask-html-01-resource.svg
@@ -0,0 +1,26 @@
+<?xml-stylesheet
+   type="text/css"
+   href="data:text/css,circle { fill: white }" ?>
+<svg height="0" xmlns="http://www.w3.org/2000/svg">
+  <style type="text/css">
+    /* XXXbz this should really be an external reference to mask-html-01.xhtml
+       but there's the little problem of "fill" not using nsReferencedElement
+       yet, so that's broken */
+    /* Test that media queries work on resource documents while we're here */
+    @media (min-resolution: 1dpi) {
+      rect { fill: url(#g); }
+    }
+  </style>
+  <mask id="m1" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
+    <linearGradient id="g" gradientUnits="objectBoundingBox" x2="0" y2="1">
+      <stop stop-color="white" offset="0"/>
+      <stop stop-color="white" stop-opacity="0" offset="1"/>
+    </linearGradient>
+    <circle cx="0.25" cy="0.25" r="0.25" id="circle" fill="black"/>
+    <rect x="0.5" y="0" width="0.5" height="1" fill="black"/>
+  </mask>
+  <script type="application/ecmascript">
+    // Make sure scripts don't run
+    document.getElementById("m1").textContent = "";
+  </script>
+</svg>
--- a/layout/reftests/svg-integration/reftest.list
+++ b/layout/reftests/svg-integration/reftest.list
@@ -1,9 +1,18 @@
 == clipPath-html-01.xhtml clipPath-html-01-ref.svg
+== clipPath-html-01-extref.xhtml clipPath-html-01-ref.svg
 == clipPath-html-02.xhtml clipPath-html-02-ref.svg
+== clipPath-html-02-extref.xhtml clipPath-html-02-ref.svg
 == clipPath-html-03.xhtml clipPath-html-03-ref.svg
+== clipPath-html-03-extref.xhtml clipPath-html-03-ref.svg
 == clipPath-html-04.xhtml clipPath-html-04-ref.xhtml
+== clipPath-html-04-extref.xhtml clipPath-html-04-ref.xhtml
 == clipPath-html-05.xhtml clipPath-html-05-ref.xhtml
+== clipPath-html-05-extref.xhtml clipPath-html-05-ref.xhtml
 == clipPath-html-06.xhtml clipPath-html-06-ref.xhtml
+== clipPath-html-06-extref.xhtml clipPath-html-06-ref.xhtml
 == filter-html-01.xhtml filter-html-01-ref.svg
+== filter-html-01-extref.xhtml filter-html-01-ref.svg
 == mask-html-01.xhtml mask-html-01-ref.svg
+== mask-html-01-extref-01.xhtml mask-html-01-ref.svg
+== mask-html-01-extref-02.xhtml mask-html-01-ref.svg
 
--- a/layout/reftests/svg/reftest.list
+++ b/layout/reftests/svg/reftest.list
@@ -32,16 +32,17 @@ include moz-only/reftest.list
 == dynamic-rect-03.svg dynamic-rect-03-ref.svg
 == dynamic-rect-04.xhtml pass.svg
 == dynamic-reflow-01.svg dynamic-reflow-01-ref.svg
 == dynamic-switch-01.svg pass.svg
 == dynamic-text-01.svg dynamic-text-01-ref.svg
 == dynamic-text-02.svg dynamic-text-02-ref.svg
 == dynamic-text-03.svg dynamic-text-03-ref.svg
 == dynamic-use-01.svg pass.svg
+== use-01-extref.svg pass.svg
 == fallback-color-01a.svg pass.svg
 == fallback-color-01b.svg pass.svg
 == fallback-color-02a.svg fallback-color-02-ref.svg
 == fallback-color-02b.svg fallback-color-02-ref.svg
 == fallback-color-03.svg pass.svg
 == filter-basic-01.svg pass.svg
 == filter-basic-02.svg pass.svg
 == filter-basic-03.svg pass.svg
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/use-01-extref-resource.svg
@@ -0,0 +1,27 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/licenses/publicdomain/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+  <g id="g3">
+    <rect width="11%" height="100%" fill="lime" id="r1"/>
+  </g>
+  <g id="g4">
+    <rect width="11%" height="100%" fill="lime"/>
+    <use x="10%" xlink:href="#r1"/>
+    <use x="20%" xlink:href="use-01-extref.svg#r2"/>
+    <use x="10%" xlink:href="use-01-extref.svg#g1"/>
+  </g>
+  <g id="g5">
+    <use xlink:href="#r1"/>
+    <use x="-60%" xlink:href="use-01-extref.svg#g2"/>
+  </g>
+  <g id="g6">
+    <use xlink:href="#r1"/>
+    <use x="10%" xlink:href="#g7"/>
+  </g>
+  <g id="g7">
+    <use xlink:href="#g6"/>
+  </g>
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/use-01-extref.svg
@@ -0,0 +1,24 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/licenses/publicdomain/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+  <title>Testing that dynamic changes to the element for a given ID are reflected in 'use'</title>
+
+  <use x="10%" xlink:href="use-01-extref-resource.svg#r1"/>
+
+  <g id="g1">
+    <use x="20%" xlink:href="use-01-extref-resource.svg#g3"/>
+  </g>
+
+  <use x="30%" xlink:href="use-01-extref-resource.svg#g4"/>
+
+  <g id="g2">
+    <use x="70%" xlink:href="use-01-extref-resource.svg#g5"/>
+  </g>
+
+  <use x="80%" xlink:href="use-01-extref-resource.svg#g6"/>
+
+  <rect width="11%" height="100%" fill="lime" id="r2"/>
+</svg>
--- a/layout/svg/crashtests/crashtests.list
+++ b/layout/svg/crashtests/crashtests.list
@@ -48,8 +48,9 @@ load 386475-1.xhtml
 load 386566-1.svg
 load 387290-1.svg
 load 402408-1.svg
 load 404677-1.xhtml
 load 409565-1.xhtml
 load 409573-1.svg
 load 429774-1.svg
 load 441368-1.svg
+load extref-test-1.xhtml