[gtk/matthiasc/for-master] Add more css filter parser tests
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] Add more css filter parser tests
- Date: Sat, 6 Feb 2021 04:04:04 +0000 (UTC)
commit 4d84612ac64ae40784f70f0612f5dbe1100eaa6a
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Feb 5 23:00:42 2021 -0500
Add more css filter parser tests
Check 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/invalid-filter1.errors | 1 -
testsuite/css/parser/meson.build | 26 ++++++++++++++++++++++
26 files changed, 55 insertions(+), 1 deletion(-)
---
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..27865aacf0
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid1.errors
@@ -0,0 +1 @@
+filter-invalid1.css:2:20-21: error: GTK_CSS_PARSER_ERROR_SYNTAX
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..5c23f1a7f2
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid2.errors
@@ -0,0 +1 @@
+filter-invalid2.css:2:27-28: error: GTK_CSS_PARSER_ERROR_SYNTAX
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..8d0f15fa77
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid3.errors
@@ -0,0 +1 @@
+filter-invalid3.css:2:25-26: error: GTK_CSS_PARSER_ERROR_SYNTAX
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..3e40f6526b
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid4.errors
@@ -0,0 +1 @@
+filter-invalid4.css:2:26-27: error: GTK_CSS_PARSER_ERROR_SYNTAX
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..b20ae843a5
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid5.errors
@@ -0,0 +1 @@
+filter-invalid5.css:2:23-24: error: GTK_CSS_PARSER_ERROR_SYNTAX
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..b6f26a9832
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid6.errors
@@ -0,0 +1 @@
+filter-invalid6.css:2:24-25: error: GTK_CSS_PARSER_ERROR_SYNTAX
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..981124d401
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid7.errors
@@ -0,0 +1 @@
+filter-invalid7.css:2:25-26: error: GTK_CSS_PARSER_ERROR_SYNTAX
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..5c1de0d383
--- /dev/null
+++ b/testsuite/css/parser/filter-invalid8.errors
@@ -0,0 +1 @@
+filter-invalid8.css:2:22-23: error: GTK_CSS_PARSER_ERROR_SYNTAX
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/meson.build b/testsuite/css/parser/meson.build
index b398251450..f4b033a863 100644
--- a/testsuite/css/parser/meson.build
+++ b/testsuite/css/parser/meson.build
@@ -311,6 +311,32 @@ 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',
'font-family.css',
'font-family.ref.css',
'font-size.css',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]