[gtk/matthiasc/for-master: 11/11] Add tests for the css filter property
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 11/11] Add tests for the css filter property
- Date: Sat, 6 Feb 2021 21:17:13 +0000 (UTC)
commit bfc80c32eae23b7e0cbd86c79cb7fc19bb89e66c
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Feb 5 21:37:47 2021 -0500
Add tests for the css filter property
Test that we can parse filters and that we
don't accept invalid filters.
.../{invalid-filter1.css => filter-invalid1.css} | 0
testsuite/css/parser/filter-invalid1.errors | 1 +
...lid-filter1.ref.css => filter-invalid1.ref.css} | 0
testsuite/css/parser/filter-invalid2.css | 3 +++
testsuite/css/parser/filter-invalid2.errors | 1 +
testsuite/css/parser/filter-invalid2.ref.css | 0
testsuite/css/parser/filter-invalid3.css | 3 +++
testsuite/css/parser/filter-invalid3.errors | 1 +
testsuite/css/parser/filter-invalid3.ref.css | 0
testsuite/css/parser/filter-invalid4.css | 3 +++
testsuite/css/parser/filter-invalid4.errors | 1 +
testsuite/css/parser/filter-invalid4.ref.css | 0
testsuite/css/parser/filter-invalid5.css | 3 +++
testsuite/css/parser/filter-invalid5.errors | 1 +
testsuite/css/parser/filter-invalid5.ref.css | 0
testsuite/css/parser/filter-invalid6.css | 3 +++
testsuite/css/parser/filter-invalid6.errors | 1 +
testsuite/css/parser/filter-invalid6.ref.css | 0
testsuite/css/parser/filter-invalid7.css | 3 +++
testsuite/css/parser/filter-invalid7.errors | 1 +
testsuite/css/parser/filter-invalid7.ref.css | 0
testsuite/css/parser/filter-invalid8.css | 3 +++
testsuite/css/parser/filter-invalid8.errors | 1 +
testsuite/css/parser/filter-invalid8.ref.css | 0
testsuite/css/parser/filter-invalid9.css | 3 +++
testsuite/css/parser/filter-invalid9.errors | 1 +
testsuite/css/parser/filter-invalid9.ref.css | 0
testsuite/css/parser/filter.ref.css | 2 +-
testsuite/css/parser/invalid-filter1.errors | 1 -
testsuite/css/parser/meson.build | 29 ++++++++++++++++++++++
30 files changed, 63 insertions(+), 2 deletions(-)
---
diff --git a/testsuite/css/parser/invalid-filter1.css b/testsuite/css/parser/filter-invalid1.css
similarity index 100%
rename from testsuite/css/parser/invalid-filter1.css
rename to testsuite/css/parser/filter-invalid1.css
diff --git a/testsuite/css/parser/filter-invalid1.errors b/testsuite/css/parser/filter-invalid1.errors
new file mode 100644
index 0000000000..abed7c492d
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid1.errors
@@ -0,0 +1 @@
+filter-invalid1.css:2:16-20: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/invalid-filter1.ref.css b/testsuite/css/parser/filter-invalid1.ref.css
similarity index 100%
rename from testsuite/css/parser/invalid-filter1.ref.css
rename to testsuite/css/parser/filter-invalid1.ref.css
diff --git a/testsuite/css/parser/filter-invalid2.css b/testsuite/css/parser/filter-invalid2.css
new file mode 100644
index 0000000000..3d83236fb0
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid2.css
@@ -0,0 +1,3 @@
+a {
+ filter: brightness(-100%);
+}
diff --git a/testsuite/css/parser/filter-invalid2.errors b/testsuite/css/parser/filter-invalid2.errors
new file mode 100644
index 0000000000..7f6e672933
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid2.errors
@@ -0,0 +1 @@
+filter-invalid2.css:2:22-27: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/filter-invalid2.ref.css b/testsuite/css/parser/filter-invalid2.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/filter-invalid3.css b/testsuite/css/parser/filter-invalid3.css
new file mode 100644
index 0000000000..49640bf7fe
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid3.css
@@ -0,0 +1,3 @@
+a {
+ filter: contrast(-100%);
+}
diff --git a/testsuite/css/parser/filter-invalid3.errors b/testsuite/css/parser/filter-invalid3.errors
new file mode 100644
index 0000000000..974ad14139
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid3.errors
@@ -0,0 +1 @@
+filter-invalid3.css:2:20-25: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/filter-invalid3.ref.css b/testsuite/css/parser/filter-invalid3.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/filter-invalid4.css b/testsuite/css/parser/filter-invalid4.css
new file mode 100644
index 0000000000..0cd2ab68b2
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid4.css
@@ -0,0 +1,3 @@
+a {
+ filter: grayscale(-100%);
+}
diff --git a/testsuite/css/parser/filter-invalid4.errors b/testsuite/css/parser/filter-invalid4.errors
new file mode 100644
index 0000000000..93544a8c1c
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid4.errors
@@ -0,0 +1 @@
+filter-invalid4.css:2:21-26: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/filter-invalid4.ref.css b/testsuite/css/parser/filter-invalid4.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/filter-invalid5.css b/testsuite/css/parser/filter-invalid5.css
new file mode 100644
index 0000000000..ccdc682b8e
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid5.css
@@ -0,0 +1,3 @@
+a {
+ filter: invert(-100%);
+}
diff --git a/testsuite/css/parser/filter-invalid5.errors b/testsuite/css/parser/filter-invalid5.errors
new file mode 100644
index 0000000000..5d385e479a
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid5.errors
@@ -0,0 +1 @@
+filter-invalid5.css:2:18-23: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/filter-invalid5.ref.css b/testsuite/css/parser/filter-invalid5.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/filter-invalid6.css b/testsuite/css/parser/filter-invalid6.css
new file mode 100644
index 0000000000..3aa37e0e51
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid6.css
@@ -0,0 +1,3 @@
+a {
+ filter: opacity(-100%);
+}
diff --git a/testsuite/css/parser/filter-invalid6.errors b/testsuite/css/parser/filter-invalid6.errors
new file mode 100644
index 0000000000..4b2f261867
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid6.errors
@@ -0,0 +1 @@
+filter-invalid6.css:2:19-24: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/filter-invalid6.ref.css b/testsuite/css/parser/filter-invalid6.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/filter-invalid7.css b/testsuite/css/parser/filter-invalid7.css
new file mode 100644
index 0000000000..7e0e7a3835
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid7.css
@@ -0,0 +1,3 @@
+a {
+ filter: saturate(-100%);
+}
diff --git a/testsuite/css/parser/filter-invalid7.errors b/testsuite/css/parser/filter-invalid7.errors
new file mode 100644
index 0000000000..615c191e9c
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid7.errors
@@ -0,0 +1 @@
+filter-invalid7.css:2:20-25: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/filter-invalid7.ref.css b/testsuite/css/parser/filter-invalid7.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/filter-invalid8.css b/testsuite/css/parser/filter-invalid8.css
new file mode 100644
index 0000000000..c5d000c349
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid8.css
@@ -0,0 +1,3 @@
+a {
+ filter: sepia(-100%);
+}
diff --git a/testsuite/css/parser/filter-invalid8.errors b/testsuite/css/parser/filter-invalid8.errors
new file mode 100644
index 0000000000..5dde01fad0
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid8.errors
@@ -0,0 +1 @@
+filter-invalid8.css:2:17-22: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/filter-invalid8.ref.css b/testsuite/css/parser/filter-invalid8.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/filter-invalid9.css b/testsuite/css/parser/filter-invalid9.css
new file mode 100644
index 0000000000..beaf0b2ef3
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid9.css
@@ -0,0 +1,3 @@
+a {
+ filter: drop-shadow(none);
+}
diff --git a/testsuite/css/parser/filter-invalid9.errors b/testsuite/css/parser/filter-invalid9.errors
new file mode 100644
index 0000000000..47893d496e
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid9.errors
@@ -0,0 +1 @@
+filter-invalid9.css:2:23-27: error: GTK_CSS_PARSER_ERROR_SYNTAX
diff --git a/testsuite/css/parser/filter-invalid9.ref.css b/testsuite/css/parser/filter-invalid9.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/filter.ref.css b/testsuite/css/parser/filter.ref.css
index 70b733b325..6e9c6ca6ac 100644
--- a/testsuite/css/parser/filter.ref.css
+++ b/testsuite/css/parser/filter.ref.css
@@ -19,5 +19,5 @@ e {
}
f {
- filter: drop_shadow(1px 2px rgb(255,0,0));
+ filter: drop-shadow(1px 2px rgb(255,0,0));
}
diff --git a/testsuite/css/parser/meson.build b/testsuite/css/parser/meson.build
index b398251450..2d476f018d 100644
--- a/testsuite/css/parser/meson.build
+++ b/testsuite/css/parser/meson.build
@@ -311,6 +311,35 @@ test_data = [
'doubled.css',
'doubled.ref.css',
'empty.css',
+ 'filter.css',
+ 'filter.ref.css',
+ 'filter-invalid1.css',
+ 'filter-invalid1.errors',
+ 'filter-invalid1.ref.css',
+ 'filter-invalid2.css',
+ 'filter-invalid2.errors',
+ 'filter-invalid2.ref.css',
+ 'filter-invalid3.css',
+ 'filter-invalid3.errors',
+ 'filter-invalid3.ref.css',
+ 'filter-invalid4.css',
+ 'filter-invalid4.errors',
+ 'filter-invalid4.ref.css',
+ 'filter-invalid5.css',
+ 'filter-invalid5.errors',
+ 'filter-invalid5.ref.css',
+ 'filter-invalid6.css',
+ 'filter-invalid6.errors',
+ 'filter-invalid6.ref.css',
+ 'filter-invalid7.css',
+ 'filter-invalid7.errors',
+ 'filter-invalid7.ref.css',
+ 'filter-invalid8.css',
+ 'filter-invalid8.errors',
+ 'filter-invalid8.ref.css',
+ 'filter-invalid9.css',
+ 'filter-invalid9.errors',
+ 'filter-invalid9.ref.css',
'font-family.css',
'font-family.ref.css',
'font-size.css',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]