From: Benjamin Otte Date: Sat, 28 May 2011 02:30:45 +0000 (+0200) Subject: tests: Add a test for border-radius handling X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=bda86b5dd369c1afa25e93513202b8ddbf40412f;p=~andy%2Fgtk tests: Add a test for border-radius handling --- diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am index 3a07b2262..6131b016a 100644 --- a/tests/css/parser/Makefile.am +++ b/tests/css/parser/Makefile.am @@ -31,6 +31,9 @@ EXTRA_DIST += \ border.css \ border.errors \ border.ref.css \ + border-radius.css \ + border-radius.errors \ + border-radius.ref.css \ close-at-end-of-file.css \ close-at-end-of-file.errors \ close-at-end-of-file.ref.css \ diff --git a/tests/css/parser/border-radius.css b/tests/css/parser/border-radius.css new file mode 100644 index 000000000..72e26b35f --- /dev/null +++ b/tests/css/parser/border-radius.css @@ -0,0 +1,117 @@ +a { + border-radius: 1; +} + +b { + border-radius: 1 2; +} + +c { + border-radius: 1 2 3; +} + +d { + border-radius: 1 2 3 4; +} + +e { + border-radius: 1 2 3 4 / 5; +} + +f { + border-radius: 1 2 3 4 / 5 6; +} + +g { + border-radius: 1 2 3 4 / 5 6 7; +} + +h { + border-radius: 1 2 3 4 / 5 6 7 8; +} + +i { + border-radius: none; +} + +j { + border-radius: 1.125 / 5.5; +} + +k { + border-radius: 1 2.25 / 5; +} + +l { + border-radius: 1 2 3.5 / 5.5 6.75; +} + +m { + border-radius: 0 / 0; +} + +n { + border-radius: 0; +} + +o { + border-radius: 0 / 1; +} + +p { + border-radius: 1 / 0; +} + +/* errors go here */ + +ea { + border-radius: -1 1 1 1 / 1 1 1 1; +} + +eb { + border-radius: 1 -1 1 1 / 1 1 1 1; +} + +ec { + border-radius: 1 1 -1 1 / 1 1 1 1; +} + +ed { + border-radius: 1 1 1 -1 / 1 1 1 1; +} + +ee { + border-radius: 1 1 1 1 / -1 1 1 1; +} + +ef { + border-radius: 1 1 1 1 / 1 -1 1 1; +} + +eg { + border-radius: 1 1 1 1 / 1 1 -1 1; +} + +eh { + border-radius: 1 1 1 1 / 1 1 1 -1; +} + +ei { + border-radius: /; +} + +ej { + border-radius: ; +} + +ek { + border-radius: 1 /; +} + +el { + border-radius: 1 2 3 4 5; +} + +em { + border-radius: 1 2 / 1 2 3 4 5; +} diff --git a/tests/css/parser/border-radius.errors b/tests/css/parser/border-radius.errors new file mode 100644 index 000000000..e6e1134be --- /dev/null +++ b/tests/css/parser/border-radius.errors @@ -0,0 +1,13 @@ +border-radius.css:68: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:72: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:76: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:80: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:84: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:88: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:92: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:96: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:100: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:104: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:108: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:112: error: GTK_CSS_PROVIDER_ERROR_SYNTAX +border-radius.css:116: error: GTK_CSS_PROVIDER_ERROR_SYNTAX diff --git a/tests/css/parser/border-radius.ref.css b/tests/css/parser/border-radius.ref.css new file mode 100644 index 000000000..a4567e3ce --- /dev/null +++ b/tests/css/parser/border-radius.ref.css @@ -0,0 +1,111 @@ +a { + border-bottom-left-radius: 1; + border-bottom-right-radius: 1; + border-top-left-radius: 1; + border-top-right-radius: 1; +} + +b { + border-bottom-left-radius: 2; + border-bottom-right-radius: 1; + border-top-left-radius: 1; + border-top-right-radius: 2; +} + +c { + border-bottom-left-radius: 2; + border-bottom-right-radius: 3; + border-top-left-radius: 1; + border-top-right-radius: 2; +} + +d { + border-bottom-left-radius: 4; + border-bottom-right-radius: 3; + border-top-left-radius: 1; + border-top-right-radius: 2; +} + +e { + border-bottom-left-radius: 4 5; + border-bottom-right-radius: 3 5; + border-top-left-radius: 1 5; + border-top-right-radius: 2 5; +} + +f { + border-bottom-left-radius: 4 6; + border-bottom-right-radius: 3 5; + border-top-left-radius: 1 5; + border-top-right-radius: 2 6; +} + +g { + border-bottom-left-radius: 4 6; + border-bottom-right-radius: 3 7; + border-top-left-radius: 1 5; + border-top-right-radius: 2 6; +} + +h { + border-bottom-left-radius: 4 8; + border-bottom-right-radius: 3 7; + border-top-left-radius: 1 5; + border-top-right-radius: 2 6; +} + +i { + border-bottom-left-radius: none; + border-bottom-right-radius: none; + border-top-left-radius: none; + border-top-right-radius: none; +} + +j { + border-bottom-left-radius: 1.125 5.5; + border-bottom-right-radius: 1.125 5.5; + border-top-left-radius: 1.125 5.5; + border-top-right-radius: 1.125 5.5; +} + +k { + border-bottom-left-radius: 2.25 5; + border-bottom-right-radius: 1 5; + border-top-left-radius: 1 5; + border-top-right-radius: 2.25 5; +} + +l { + border-bottom-left-radius: 2 6.75; + border-bottom-right-radius: 3.5 5.5; + border-top-left-radius: 1 5.5; + border-top-right-radius: 2 6.75; +} + +m { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +n { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +o { + border-bottom-left-radius: 0 1; + border-bottom-right-radius: 0 1; + border-top-left-radius: 0 1; + border-top-right-radius: 0 1; +} + +p { + border-bottom-left-radius: 1 0; + border-bottom-right-radius: 1 0; + border-top-left-radius: 1 0; + border-top-right-radius: 1 0; +}