From 174cfff50f1026b3ecc7ae0f14d8d360523bf2a1 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 15 May 2011 00:17:04 +0200 Subject: [PATCH] tests: Add a test to ensure we handle unknown pseudo-classes correctly 1) We want to throw an unknown value 2) We want to skip the whole rule --- tests/css/parser/Makefile.am | 3 +++ tests/css/parser/pseudo-classes-unknown.css | 23 +++++++++++++++++++ .../css/parser/pseudo-classes-unknown.errors | 6 +++++ .../css/parser/pseudo-classes-unknown.ref.css | 0 4 files changed, 32 insertions(+) create mode 100644 tests/css/parser/pseudo-classes-unknown.css create mode 100644 tests/css/parser/pseudo-classes-unknown.errors create mode 100644 tests/css/parser/pseudo-classes-unknown.ref.css diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am index 84a24225d5..9ffd43790c 100644 --- a/tests/css/parser/Makefile.am +++ b/tests/css/parser/Makefile.am @@ -68,6 +68,9 @@ EXTRA_DIST += \ integer.ref.css \ no-semicolon.css \ no-semicolon.ref.css \ + pseudo-classes-unknown.css \ + pseudo-classes-unknown.errors \ + pseudo-classes-unknown.ref.css \ selector.css \ selector.ref.css \ simple.css diff --git a/tests/css/parser/pseudo-classes-unknown.css b/tests/css/parser/pseudo-classes-unknown.css new file mode 100644 index 0000000000..fa82e7da46 --- /dev/null +++ b/tests/css/parser/pseudo-classes-unknown.css @@ -0,0 +1,23 @@ +:nobody-knows-me { + int-property: 42; +} + +:nobody-knows-me(really) { + int-property: 42; +} + +:a:lot:of:unkwnown:pseudo:classes(some):of(them):with:functions( spaces ) { + int-property: 42; +} + +:nth-child { + int-property: 42; +} + +:nth-child() { + int-property: 42; +} + +x, :unknown-pseudo-classes-invalidate-selectors, y { + int-property: 42; +} diff --git a/tests/css/parser/pseudo-classes-unknown.errors b/tests/css/parser/pseudo-classes-unknown.errors new file mode 100644 index 0000000000..18b98855e9 --- /dev/null +++ b/tests/css/parser/pseudo-classes-unknown.errors @@ -0,0 +1,6 @@ +pseudo-classes-unknown.css:1: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE +pseudo-classes-unknown.css:5: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE +pseudo-classes-unknown.css:9: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE +pseudo-classes-unknown.css:13: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE +pseudo-classes-unknown.css:17: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE +pseudo-classes-unknown.css:21: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE diff --git a/tests/css/parser/pseudo-classes-unknown.ref.css b/tests/css/parser/pseudo-classes-unknown.ref.css new file mode 100644 index 0000000000..e69de29bb2