[gtk+] tests: Add background-position parsing test



commit 5a20c42c7c6a1d44de23f0cc48d92a7f8f410b6d
Author: Benjamin Otte <otte redhat com>
Date:   Sat Mar 17 05:09:35 2012 +0100

    tests: Add background-position parsing test
    
    Man, the syntax is convoluted.

 tests/css/parser/Makefile.am                 |    3 +
 tests/css/parser/background-position.css     |  167 ++++++++++++++++++++++++++
 tests/css/parser/background-position.errors  |   15 +++
 tests/css/parser/background-position.ref.css |  111 +++++++++++++++++
 4 files changed, 296 insertions(+), 0 deletions(-)
---
diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am
index fdce5b9..b300d12 100644
--- a/tests/css/parser/Makefile.am
+++ b/tests/css/parser/Makefile.am
@@ -149,6 +149,9 @@ EXTRA_DIST += \
 	at-valid-21.css \
 	at-valid-21.errors \
 	at-valid-21.ref.css \
+	background-position.css \
+	background-position.errors \
+	background-position.ref.css \
 	background-repeat.css \
 	background-repeat.ref.css \
 	background-shorthand.css \
diff --git a/tests/css/parser/background-position.css b/tests/css/parser/background-position.css
new file mode 100644
index 0000000..6bc474a
--- /dev/null
+++ b/tests/css/parser/background-position.css
@@ -0,0 +1,167 @@
+a {
+  background-position: top;
+}
+
+b {
+  background-position: top top;
+}
+
+c {
+  background-position: top left;
+}
+
+d {
+  background-position: top right;
+}
+
+e {
+  background-position: top bottom;
+}
+
+f {
+  background-position: top center;
+}
+
+g {
+  background-position: top 25%;
+}
+
+h {
+  background-position: left;
+}
+
+i {
+  background-position: left top;
+}
+
+j {
+  background-position: left left;
+}
+
+k {
+  background-position: left right;
+}
+
+l {
+  background-position: left bottom;
+}
+
+m {
+  background-position: left center;
+}
+
+n {
+  background-position: left 25%;
+}
+
+o {
+  background-position: right;
+}
+
+p {
+  background-position: right top;
+}
+
+q {
+  background-position: right left;
+}
+
+r {
+  background-position: right right;
+}
+
+s {
+  background-position: right bottom;
+}
+
+t {
+  background-position: right center;
+}
+
+u {
+  background-position: right 25%;
+}
+
+v {
+  background-position: bottom;
+}
+
+w {
+  background-position: bottom top;
+}
+
+x {
+  background-position: bottom left;
+}
+
+y {
+  background-position: bottom right;
+}
+
+z {
+  background-position: bottom bottom;
+}
+
+ab {
+  background-position: bottom center;
+}
+
+bb {
+  background-position: bottom 25%;
+}
+
+cb {
+  background-position: center;
+}
+
+db {
+  background-position: center top;
+}
+
+eb {
+  background-position: center left;
+}
+
+fb {
+  background-position: center right;
+}
+
+gb {
+  background-position: center bottom;
+}
+
+hb {
+  background-position: center center;
+}
+
+ib {
+  background-position: center 25%;
+}
+
+jb {
+  background-position: 25%;
+}
+
+kb {
+  background-position: 25% top;
+}
+
+lb {
+  background-position: 25% left;
+}
+
+mb {
+  background-position: 25% right;
+}
+
+nb {
+  background-position: 25% bottom;
+}
+
+ob {
+  background-position: 25% center;
+}
+
+pb {
+  background-position: 25% 25%;
+}
diff --git a/tests/css/parser/background-position.errors b/tests/css/parser/background-position.errors
new file mode 100644
index 0000000..811c6e1
--- /dev/null
+++ b/tests/css/parser/background-position.errors
@@ -0,0 +1,15 @@
+background-position.css:6: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:18: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:26: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:38: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:42: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:66: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:70: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:90: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:102: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:110: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:122: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:126: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:150: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+background-position.css:154: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+
diff --git a/tests/css/parser/background-position.ref.css b/tests/css/parser/background-position.ref.css
new file mode 100644
index 0000000..f36bd04
--- /dev/null
+++ b/tests/css/parser/background-position.ref.css
@@ -0,0 +1,111 @@
+a {
+  background-position: top;
+}
+
+c {
+  background-position: left top;
+}
+
+d {
+  background-position: right top;
+}
+
+f {
+  background-position: top;
+}
+
+h {
+  background-position: left;
+}
+
+i {
+  background-position: left top;
+}
+
+l {
+  background-position: left bottom;
+}
+
+m {
+  background-position: left;
+}
+
+n {
+  background-position: left 25%;
+}
+
+o {
+  background-position: right;
+}
+
+p {
+  background-position: right top;
+}
+
+s {
+  background-position: right bottom;
+}
+
+t {
+  background-position: right;
+}
+
+u {
+  background-position: right 25%;
+}
+
+v {
+  background-position: bottom;
+}
+
+x {
+  background-position: left bottom;
+}
+
+y {
+  background-position: right bottom;
+}
+
+ab {
+  background-position: bottom;
+}
+
+cb {
+  background-position: center;
+}
+
+db {
+  background-position: top;
+}
+
+gb {
+  background-position: bottom;
+}
+
+hb {
+  background-position: center;
+}
+
+ib {
+  background-position: center 25%;
+}
+
+jb {
+  background-position: 25%;
+}
+
+kb {
+  background-position: 25% top;
+}
+
+nb {
+  background-position: 25% bottom;
+}
+
+ob {
+  background-position: 25%;
+}
+
+pb {
+  background-position: 25% 25%;
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]