Bug 1449118 - Force SVGs to load when running the twisty reftest. r=dholbert
MozReview-Commit-ID: HxU0B0Bxwgp
--- a/layout/reftests/xul/reftest.list
+++ b/layout/reftests/xul/reftest.list
@@ -70,9 +70,11 @@ fails == object-fit-fill-svg-006.xul obj
# Tests for rendering SVG images in a XUL <treecell>:
# XXXdholbert: These are marked as "random" right now, since they might not
# render the images they trying to test in time for the reftest snapshot, per
# bug 1218954.
skip == treecell-image-svg-1a.xul treecell-image-svg-1-ref.xul # bug 1218954
skip == treecell-image-svg-1b.xul treecell-image-svg-1-ref.xul # bug 1218954
== treechildren-padding-percent-1.xul treechildren-padding-percent-1-ref.xul
-test-pref(svg.context-properties.content.enabled,true) == treetwisty-svg-context-paint-1.xul treetwisty-svg-context-paint-1-ref.xul
\ No newline at end of file
+
+!= treetwisty-svg-context-paint-1-not-ref.xul treetwisty-svg-context-paint-1-ref.xul
+test-pref(svg.context-properties.content.enabled,true) == treetwisty-svg-context-paint-1.xul treetwisty-svg-context-paint-1-ref.xul
new file mode 100644
--- /dev/null
+++ b/layout/reftests/xul/treetwisty-svg-context-paint-1-not-ref.xul
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <html:style>
+ treechildren::-moz-tree-twisty {
+ -moz-appearance: none !important;
+ -moz-context-properties: none !important;
+ list-style: none !important;
+ }
+ </html:style>
+ <tree seltype="single" flex="1">
+ <treecols>
+ <treecol flex="1" primary="true"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="I am a treecell"></treecell>
+ </treerow>
+ </treeitem>
+ <treeitem container="true" open="true">
+ <treerow>
+ <treecell label="Folder"></treecell>
+ </treerow>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="I am a treecell"></treecell>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </treeitem>
+ </treechildren>
+ </tree>
+</window>
--- a/layout/reftests/xul/treetwisty-svg-context-paint-1-ref.xul
+++ b/layout/reftests/xul/treetwisty-svg-context-paint-1-ref.xul
@@ -1,14 +1,19 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml">
+ <image src="treetwisty-no-context-paint.svg" id="preload-image"/>
<html:style>
+ #preload-image {
+ visibility: collapse;
+ }
+
treechildren::-moz-tree-twisty {
-moz-appearance: none !important;
-moz-context-properties: none !important;
list-style-image: url(treetwisty-no-context-paint.svg);
}
</html:style>
<tree seltype="single" flex="1">
<treecols>
--- a/layout/reftests/xul/treetwisty-svg-context-paint-1.xul
+++ b/layout/reftests/xul/treetwisty-svg-context-paint-1.xul
@@ -1,14 +1,20 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml">
+ <image src="treetwisty-context-paint.svg" id="preload-image"/>
<html:style>
+ #preload-image {
+ visibility: collapse;
+ }
+
+ #preload-image,
treechildren::-moz-tree-twisty {
-moz-appearance: none !important;
-moz-context-properties: fill, fill-opacity, stroke, stroke-opacity !important;
fill: green;
fill-opacity: 0.5;
stroke: purple;
stroke-opacity: 0.2;
list-style-image: url(treetwisty-context-paint.svg);