summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-05-20 03:32:30 +0200
committerBenjamin Otte <otte@redhat.com>2019-05-21 06:43:59 +0200
commit0a32305f01791d819158b305b9f294ca58ffd33c (patch)
tree5baac4ded9433d377d5fda339bac5b3fb486f3d3
parenteb386134e35c229ef20d71163e8ae0c4e75a4031 (diff)
downloadgtk+-0a32305f01791d819158b305b9f294ca58ffd33c.tar.gz
testsuite: Add render tests for all the empty nodes
Test that rendering empty nodes succees. For a lot of nodes the resulting rendering isn't clearly defined, in those cases we overdraw those regions (sometimes the whole image) with black.
-rw-r--r--testsuite/gsk/compare/empty-blend.node1
-rw-r--r--testsuite/gsk/compare/empty-blend.pngbin0 -> 153 bytes
-rw-r--r--testsuite/gsk/compare/empty-blur.node20
-rw-r--r--testsuite/gsk/compare/empty-blur.pngbin0 -> 167 bytes
-rw-r--r--testsuite/gsk/compare/empty-border.node1
-rw-r--r--testsuite/gsk/compare/empty-border.pngbin0 -> 169 bytes
-rw-r--r--testsuite/gsk/compare/empty-clip.node1
-rw-r--r--testsuite/gsk/compare/empty-clip.pngbin0 -> 153 bytes
-rw-r--r--testsuite/gsk/compare/empty-color-matrix.node1
-rw-r--r--testsuite/gsk/compare/empty-color-matrix.pngbin0 -> 153 bytes
-rw-r--r--testsuite/gsk/compare/empty-color.node1
-rw-r--r--testsuite/gsk/compare/empty-color.pngbin0 -> 153 bytes
-rw-r--r--testsuite/gsk/compare/empty-container.node8
-rw-r--r--testsuite/gsk/compare/empty-container.pngbin0 -> 86 bytes
-rw-r--r--testsuite/gsk/compare/empty-cross-fade.node9
-rw-r--r--testsuite/gsk/compare/empty-cross-fade.pngbin0 -> 105 bytes
-rw-r--r--testsuite/gsk/compare/empty-debug.node1
-rw-r--r--testsuite/gsk/compare/empty-debug.pngbin0 -> 153 bytes
-rw-r--r--testsuite/gsk/compare/empty-inset-shadow.node1
-rw-r--r--testsuite/gsk/compare/empty-inset-shadow.pngbin0 -> 164 bytes
-rw-r--r--testsuite/gsk/compare/empty-linear-gradient.node1
-rw-r--r--testsuite/gsk/compare/empty-linear-gradient.pngbin0 -> 203 bytes
-rw-r--r--testsuite/gsk/compare/empty-opacity.node9
-rw-r--r--testsuite/gsk/compare/empty-opacity.pngbin0 -> 105 bytes
-rw-r--r--testsuite/gsk/compare/empty-outset-shadow.node1
-rw-r--r--testsuite/gsk/compare/empty-outset-shadow.pngbin0 -> 168 bytes
-rw-r--r--testsuite/gsk/compare/empty-repeat.node1
-rw-r--r--testsuite/gsk/compare/empty-repeat.pngbin0 -> 153 bytes
-rw-r--r--testsuite/gsk/compare/empty-rounded-clip.node1
-rw-r--r--testsuite/gsk/compare/empty-rounded-clip.pngbin0 -> 153 bytes
-rw-r--r--testsuite/gsk/compare/empty-shadow.node1
-rw-r--r--testsuite/gsk/compare/empty-shadow.pngbin0 -> 181 bytes
-rw-r--r--testsuite/gsk/compare/empty-text.node1
-rw-r--r--testsuite/gsk/compare/empty-text.pngbin0 -> 405 bytes
-rw-r--r--testsuite/gsk/compare/empty-texture.node12
-rw-r--r--testsuite/gsk/compare/empty-texture.pngbin0 -> 197 bytes
-rw-r--r--testsuite/gsk/compare/empty-transform.node1
-rw-r--r--testsuite/gsk/compare/empty-transform.pngbin0 -> 153 bytes
-rw-r--r--testsuite/gsk/meson.build19
39 files changed, 91 insertions, 0 deletions
diff --git a/testsuite/gsk/compare/empty-blend.node b/testsuite/gsk/compare/empty-blend.node
new file mode 100644
index 0000000000..291d805ff7
--- /dev/null
+++ b/testsuite/gsk/compare/empty-blend.node
@@ -0,0 +1 @@
+blend { }
diff --git a/testsuite/gsk/compare/empty-blend.png b/testsuite/gsk/compare/empty-blend.png
new file mode 100644
index 0000000000..3a032a391b
--- /dev/null
+++ b/testsuite/gsk/compare/empty-blend.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-blur.node b/testsuite/gsk/compare/empty-blur.node
new file mode 100644
index 0000000000..a4a6298c09
--- /dev/null
+++ b/testsuite/gsk/compare/empty-blur.node
@@ -0,0 +1,20 @@
+blur { }
+
+/* The blur algorithm isn't specified, so
+ don't test it. */
+color {
+ bounds: -3 -3 50 6;
+ color: black;
+}
+color {
+ bounds: 47 -3 6 50;
+ color: black;
+}
+color {
+ bounds: 3 47 50 6;
+ color: black;
+}
+color {
+ bounds: -3 3 6 50;
+ color: black;
+}
diff --git a/testsuite/gsk/compare/empty-blur.png b/testsuite/gsk/compare/empty-blur.png
new file mode 100644
index 0000000000..313d6d8811
--- /dev/null
+++ b/testsuite/gsk/compare/empty-blur.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-border.node b/testsuite/gsk/compare/empty-border.node
new file mode 100644
index 0000000000..0a58c89c65
--- /dev/null
+++ b/testsuite/gsk/compare/empty-border.node
@@ -0,0 +1 @@
+border { }
diff --git a/testsuite/gsk/compare/empty-border.png b/testsuite/gsk/compare/empty-border.png
new file mode 100644
index 0000000000..5d3e0fdcb1
--- /dev/null
+++ b/testsuite/gsk/compare/empty-border.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-clip.node b/testsuite/gsk/compare/empty-clip.node
new file mode 100644
index 0000000000..c513eb6597
--- /dev/null
+++ b/testsuite/gsk/compare/empty-clip.node
@@ -0,0 +1 @@
+clip { }
diff --git a/testsuite/gsk/compare/empty-clip.png b/testsuite/gsk/compare/empty-clip.png
new file mode 100644
index 0000000000..3a032a391b
--- /dev/null
+++ b/testsuite/gsk/compare/empty-clip.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-color-matrix.node b/testsuite/gsk/compare/empty-color-matrix.node
new file mode 100644
index 0000000000..c0fcc1cbd5
--- /dev/null
+++ b/testsuite/gsk/compare/empty-color-matrix.node
@@ -0,0 +1 @@
+color-matrix { }
diff --git a/testsuite/gsk/compare/empty-color-matrix.png b/testsuite/gsk/compare/empty-color-matrix.png
new file mode 100644
index 0000000000..3a032a391b
--- /dev/null
+++ b/testsuite/gsk/compare/empty-color-matrix.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-color.node b/testsuite/gsk/compare/empty-color.node
new file mode 100644
index 0000000000..adaf509095
--- /dev/null
+++ b/testsuite/gsk/compare/empty-color.node
@@ -0,0 +1 @@
+color { }
diff --git a/testsuite/gsk/compare/empty-color.png b/testsuite/gsk/compare/empty-color.png
new file mode 100644
index 0000000000..3a032a391b
--- /dev/null
+++ b/testsuite/gsk/compare/empty-color.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-container.node b/testsuite/gsk/compare/empty-container.node
new file mode 100644
index 0000000000..2ab6cf0ccb
--- /dev/null
+++ b/testsuite/gsk/compare/empty-container.node
@@ -0,0 +1,8 @@
+container { }
+
+/* We need to contain something because 0x0 nodes
+ cause NULL textures */
+color {
+ bounds: -1 -1 1 1;
+ color: transparent;
+}
diff --git a/testsuite/gsk/compare/empty-container.png b/testsuite/gsk/compare/empty-container.png
new file mode 100644
index 0000000000..7238a64657
--- /dev/null
+++ b/testsuite/gsk/compare/empty-container.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-cross-fade.node b/testsuite/gsk/compare/empty-cross-fade.node
new file mode 100644
index 0000000000..1b69ede5fc
--- /dev/null
+++ b/testsuite/gsk/compare/empty-cross-fade.node
@@ -0,0 +1,9 @@
+cross-fade { }
+
+/* This is not very useful as a test, because the
+ resulting color is undefined, because 0.5 * 255
+ can be rounded to either 127 or 128 by the renderers.
+ But at least we know they get the size right... */
+color {
+ color: black;
+}
diff --git a/testsuite/gsk/compare/empty-cross-fade.png b/testsuite/gsk/compare/empty-cross-fade.png
new file mode 100644
index 0000000000..68e443cac3
--- /dev/null
+++ b/testsuite/gsk/compare/empty-cross-fade.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-debug.node b/testsuite/gsk/compare/empty-debug.node
new file mode 100644
index 0000000000..088a305cf9
--- /dev/null
+++ b/testsuite/gsk/compare/empty-debug.node
@@ -0,0 +1 @@
+debug { }
diff --git a/testsuite/gsk/compare/empty-debug.png b/testsuite/gsk/compare/empty-debug.png
new file mode 100644
index 0000000000..3a032a391b
--- /dev/null
+++ b/testsuite/gsk/compare/empty-debug.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-inset-shadow.node b/testsuite/gsk/compare/empty-inset-shadow.node
new file mode 100644
index 0000000000..5b84e7c8a5
--- /dev/null
+++ b/testsuite/gsk/compare/empty-inset-shadow.node
@@ -0,0 +1 @@
+inset-shadow { }
diff --git a/testsuite/gsk/compare/empty-inset-shadow.png b/testsuite/gsk/compare/empty-inset-shadow.png
new file mode 100644
index 0000000000..b159674785
--- /dev/null
+++ b/testsuite/gsk/compare/empty-inset-shadow.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-linear-gradient.node b/testsuite/gsk/compare/empty-linear-gradient.node
new file mode 100644
index 0000000000..ef6234b661
--- /dev/null
+++ b/testsuite/gsk/compare/empty-linear-gradient.node
@@ -0,0 +1 @@
+linear-gradient { }
diff --git a/testsuite/gsk/compare/empty-linear-gradient.png b/testsuite/gsk/compare/empty-linear-gradient.png
new file mode 100644
index 0000000000..f0e1db0e27
--- /dev/null
+++ b/testsuite/gsk/compare/empty-linear-gradient.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-opacity.node b/testsuite/gsk/compare/empty-opacity.node
new file mode 100644
index 0000000000..ef197ada17
--- /dev/null
+++ b/testsuite/gsk/compare/empty-opacity.node
@@ -0,0 +1,9 @@
+opacity { }
+
+/* This is not very useful as a test, because the
+ resulting color is undefined, because 0.5 * 255
+ can be rounded to either 127 or 128 by the renderers.
+ But at least we know they get the size right... */
+color {
+ color: black;
+}
diff --git a/testsuite/gsk/compare/empty-opacity.png b/testsuite/gsk/compare/empty-opacity.png
new file mode 100644
index 0000000000..68e443cac3
--- /dev/null
+++ b/testsuite/gsk/compare/empty-opacity.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-outset-shadow.node b/testsuite/gsk/compare/empty-outset-shadow.node
new file mode 100644
index 0000000000..87858be472
--- /dev/null
+++ b/testsuite/gsk/compare/empty-outset-shadow.node
@@ -0,0 +1 @@
+outset-shadow { }
diff --git a/testsuite/gsk/compare/empty-outset-shadow.png b/testsuite/gsk/compare/empty-outset-shadow.png
new file mode 100644
index 0000000000..3a5fd99bdd
--- /dev/null
+++ b/testsuite/gsk/compare/empty-outset-shadow.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-repeat.node b/testsuite/gsk/compare/empty-repeat.node
new file mode 100644
index 0000000000..9f82f0e3ac
--- /dev/null
+++ b/testsuite/gsk/compare/empty-repeat.node
@@ -0,0 +1 @@
+repeat { }
diff --git a/testsuite/gsk/compare/empty-repeat.png b/testsuite/gsk/compare/empty-repeat.png
new file mode 100644
index 0000000000..3a032a391b
--- /dev/null
+++ b/testsuite/gsk/compare/empty-repeat.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-rounded-clip.node b/testsuite/gsk/compare/empty-rounded-clip.node
new file mode 100644
index 0000000000..28373aa45f
--- /dev/null
+++ b/testsuite/gsk/compare/empty-rounded-clip.node
@@ -0,0 +1 @@
+rounded-clip { }
diff --git a/testsuite/gsk/compare/empty-rounded-clip.png b/testsuite/gsk/compare/empty-rounded-clip.png
new file mode 100644
index 0000000000..3a032a391b
--- /dev/null
+++ b/testsuite/gsk/compare/empty-rounded-clip.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-shadow.node b/testsuite/gsk/compare/empty-shadow.node
new file mode 100644
index 0000000000..3f4879359d
--- /dev/null
+++ b/testsuite/gsk/compare/empty-shadow.node
@@ -0,0 +1 @@
+shadow { }
diff --git a/testsuite/gsk/compare/empty-shadow.png b/testsuite/gsk/compare/empty-shadow.png
new file mode 100644
index 0000000000..47617ce64c
--- /dev/null
+++ b/testsuite/gsk/compare/empty-shadow.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-text.node b/testsuite/gsk/compare/empty-text.node
new file mode 100644
index 0000000000..5964c4e7d1
--- /dev/null
+++ b/testsuite/gsk/compare/empty-text.node
@@ -0,0 +1 @@
+text { }
diff --git a/testsuite/gsk/compare/empty-text.png b/testsuite/gsk/compare/empty-text.png
new file mode 100644
index 0000000000..cd7cd8af8d
--- /dev/null
+++ b/testsuite/gsk/compare/empty-text.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-texture.node b/testsuite/gsk/compare/empty-texture.node
new file mode 100644
index 0000000000..ba8d2d4fb8
--- /dev/null
+++ b/testsuite/gsk/compare/empty-texture.node
@@ -0,0 +1,12 @@
+texture { }
+
+/* The bilinear filtering code can differ
+ between implementations, so cover it */
+color {
+ bounds: 21 0 10 50;
+ color: black;
+}
+color {
+ bounds: 0 21 50 10;
+ color: black;
+}
diff --git a/testsuite/gsk/compare/empty-texture.png b/testsuite/gsk/compare/empty-texture.png
new file mode 100644
index 0000000000..bb5a60636f
--- /dev/null
+++ b/testsuite/gsk/compare/empty-texture.png
Binary files differ
diff --git a/testsuite/gsk/compare/empty-transform.node b/testsuite/gsk/compare/empty-transform.node
new file mode 100644
index 0000000000..4833ddb193
--- /dev/null
+++ b/testsuite/gsk/compare/empty-transform.node
@@ -0,0 +1 @@
+transform { }
diff --git a/testsuite/gsk/compare/empty-transform.png b/testsuite/gsk/compare/empty-transform.png
new file mode 100644
index 0000000000..3a032a391b
--- /dev/null
+++ b/testsuite/gsk/compare/empty-transform.png
Binary files differ
diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
index e2e0328284..cecc0ebed0 100644
--- a/testsuite/gsk/meson.build
+++ b/testsuite/gsk/meson.build
@@ -32,6 +32,25 @@ compare_render_tests = [
'clipped_rounded_clip',
'color-blur0',
'cross-fade-in-opacity',
+ 'empty-blend',
+ 'empty-blur',
+ 'empty-border',
+ 'empty-clip',
+ 'empty-color',
+ 'empty-color-matrix',
+ 'empty-container',
+ 'empty-cross-fade',
+ 'empty-debug',
+ 'empty-inset-shadow',
+ 'empty-linear-gradient',
+ 'empty-opacity',
+ 'empty-outset-shadow',
+ 'empty-repeat',
+ 'empty-rounded-clip',
+ 'empty-shadow',
+ 'empty-text',
+ 'empty-texture',
+ 'empty-transform',
'opacity_clip',
'outset_shadow_offset_both',
'outset_shadow_offset_x',