summaryrefslogtreecommitdiff
path: root/testsuite/css
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2014-07-30 18:23:20 +0200
committerBenjamin Otte <otte@redhat.com>2014-07-31 10:03:18 +0200
commit5f5d3a9d820004e88b43ff20884d604b4620e47e (patch)
tree9aec2eed1041c371785e72b7d1a1790a03e510b5 /testsuite/css
parent83c9fe109ea705fc6beabb561658aa08432ae0cf (diff)
downloadgtk+-5f5d3a9d820004e88b43ff20884d604b4620e47e.tar.gz
css: Don't infloop when parsing broken borders
There was an infinite loop when parsing invalid text after having parsed a color in the border shorthand. 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/border-infloop-3.12.css3
-rw-r--r--testsuite/css/parser/border-infloop-3.12.errors1
-rw-r--r--testsuite/css/parser/border-infloop-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 c7754ce39a..f44f7757dc 100644
--- a/testsuite/css/parser/Makefile.am
+++ b/testsuite/css/parser/Makefile.am
@@ -178,6 +178,9 @@ test_data = \
border.ref.css \
border-color-currentcolor.css \
border-color-currentcolor.ref.css \
+ border-infloop-3.12.css \
+ border-infloop-3.12.errors \
+ border-infloop-3.12.ref.css \
border-radius.css \
border-radius.errors \
border-radius.ref.css \
diff --git a/testsuite/css/parser/border-infloop-3.12.css b/testsuite/css/parser/border-infloop-3.12.css
new file mode 100644
index 0000000000..62acb3e69e
--- /dev/null
+++ b/testsuite/css/parser/border-infloop-3.12.css
@@ -0,0 +1,3 @@
+* {
+ border-bottom: tomato dot;
+}
diff --git a/testsuite/css/parser/border-infloop-3.12.errors b/testsuite/css/parser/border-infloop-3.12.errors
new file mode 100644
index 0000000000..808dde302a
--- /dev/null
+++ b/testsuite/css/parser/border-infloop-3.12.errors
@@ -0,0 +1 @@
+border-infloop-3.12.css:2: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
diff --git a/testsuite/css/parser/border-infloop-3.12.ref.css b/testsuite/css/parser/border-infloop-3.12.ref.css
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/css/parser/border-infloop-3.12.ref.css