summaryrefslogtreecommitdiff
path: root/testsuite/css
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2014-07-30 18:45:15 +0200
committerBenjamin Otte <otte@redhat.com>2014-07-31 10:03:19 +0200
commitd6e9997619fb6bfe082360f1702d6d29250dc3ce (patch)
tree4e9ffd12a1bc3c9725d29e3f05fadc37fc26939e /testsuite/css
parent5f5d3a9d820004e88b43ff20884d604b4620e47e (diff)
downloadgtk+-d6e9997619fb6bfe082360f1702d6d29250dc3ce.tar.gz
css: Fail animation shorthand parsing properly
When a number is not a nubmer, don't just crash, exit properly with an error code. See attached testcase for an example.
Diffstat (limited to 'testsuite/css')
-rw-r--r--testsuite/css/parser/Makefile.am3
-rw-r--r--testsuite/css/parser/animation-crash-3.12.css3
-rw-r--r--testsuite/css/parser/animation-crash-3.12.errors1
-rw-r--r--testsuite/css/parser/animation-crash-3.12.ref.css0
4 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/css/parser/Makefile.am b/testsuite/css/parser/Makefile.am
index f44f7757dc..4c35afeecf 100644
--- a/testsuite/css/parser/Makefile.am
+++ b/testsuite/css/parser/Makefile.am
@@ -30,6 +30,9 @@ clean-local:
rm $(builddir)/*.out.css || true
test_data = \
+ animation-crash-3.12.css \
+ animation-crash-3.12.errors \
+ animation-crash-3.12.ref.css \
animation-shorthand-crash.css \
animation-shorthand-crash.ref.css \
at-invalid-01.css \
diff --git a/testsuite/css/parser/animation-crash-3.12.css b/testsuite/css/parser/animation-crash-3.12.css
new file mode 100644
index 0000000000..c9f4506eec
--- /dev/null
+++ b/testsuite/css/parser/animation-crash-3.12.css
@@ -0,0 +1,3 @@
+* {
+ animation: 2gra;
+}
diff --git a/testsuite/css/parser/animation-crash-3.12.errors b/testsuite/css/parser/animation-crash-3.12.errors
new file mode 100644
index 0000000000..8c9ecc4c9c
--- /dev/null
+++ b/testsuite/css/parser/animation-crash-3.12.errors
@@ -0,0 +1 @@
+animation-crash-3.12.css:2: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
diff --git a/testsuite/css/parser/animation-crash-3.12.ref.css b/testsuite/css/parser/animation-crash-3.12.ref.css
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/css/parser/animation-crash-3.12.ref.css