tests: Move declaration tests to new test infrastructure

This way, we can test more feature of them, in particular check for
different errors, which were causing test failures.
This commit is contained in:
Benjamin Otte
2011-07-21 02:41:42 +02:00
parent 47635a2434
commit d56e8c8e54
79 changed files with 264 additions and 83 deletions

View File

@ -175,6 +175,81 @@ EXTRA_DIST += \
declarations.css \
declarations.errors \
declarations.ref.css \
declarations-invalid-01.css \
declarations-invalid-01.errors \
declarations-invalid-01.ref.css \
declarations-invalid-02.css \
declarations-invalid-02.errors \
declarations-invalid-02.ref.css \
declarations-invalid-03.css \
declarations-invalid-03.errors \
declarations-invalid-03.ref.css \
declarations-invalid-04.css \
declarations-invalid-04.errors \
declarations-invalid-04.ref.css \
declarations-invalid-05.css \
declarations-invalid-05.errors \
declarations-invalid-05.ref.css \
declarations-invalid-06.css \
declarations-invalid-06.errors \
declarations-invalid-06.ref.css \
declarations-invalid-07.css \
declarations-invalid-07.errors \
declarations-invalid-07.ref.css \
declarations-invalid-08.css \
declarations-invalid-08.errors \
declarations-invalid-08.ref.css \
declarations-valid-01.css \
declarations-valid-01.ref.css \
declarations-valid-02.css \
declarations-valid-02.ref.css \
declarations-valid-03.css \
declarations-valid-03.ref.css \
declarations-valid-04.css \
declarations-valid-04.ref.css \
declarations-valid-05.css \
declarations-valid-05.ref.css \
declarations-valid-06.css \
declarations-valid-06.ref.css \
declarations-valid-07.css \
declarations-valid-07.ref.css \
declarations-valid-08.css \
declarations-valid-08.ref.css \
declarations-valid-09.css \
declarations-valid-09.ref.css \
declarations-valid-10.css \
declarations-valid-10.ref.css \
declarations-valid-11.css \
declarations-valid-11.ref.css \
declarations-valid-12.css \
declarations-valid-12.ref.css \
declarations-valid-13.css \
declarations-valid-13.ref.css \
declarations-valid-14.css \
declarations-valid-14.ref.css \
declarations-valid-15.css \
declarations-valid-15.ref.css \
declarations-valid-16.css \
declarations-valid-16.ref.css \
declarations-valid-17.css \
declarations-valid-17.ref.css \
declarations-valid-18.css \
declarations-valid-18.errors \
declarations-valid-18.ref.css \
declarations-valid-19.css \
declarations-valid-19.ref.css \
declarations-valid-20.css \
declarations-valid-20.ref.css \
declarations-valid-21.css \
declarations-valid-21.ref.css \
declarations-valid-22.css \
declarations-valid-22.ref.css \
declarations-valid-23.css \
declarations-valid-23.ref.css \
declarations-valid-24.css \
declarations-valid-24.ref.css \
declarations-valid-25.css \
declarations-valid-25.ref.css \
does-not-exist.css \
does-not-exist.errors \
does-not-exist.ref.css \

View File

@ -0,0 +1 @@
* { color }

View File

@ -0,0 +1 @@
declarations-invalid-01.css:1: error: GTK_CSS_PROVIDER_ERROR_SYNTAX

View File

@ -0,0 +1 @@
* { color:green; color }

View File

@ -0,0 +1 @@
declarations-invalid-02.css:1: error: GTK_CSS_PROVIDER_ERROR_SYNTAX

View File

@ -0,0 +1,3 @@
* {
color: rgb(0,255,0);
}

View File

@ -0,0 +1 @@
* { color:red; color; color:green }

View File

@ -0,0 +1 @@
declarations-invalid-03.css:1: error: GTK_CSS_PROVIDER_ERROR_SYNTAX

View File

@ -0,0 +1,3 @@
* {
color: rgb(0,255,0);
}

View File

@ -0,0 +1 @@
* { color:green; color: }

View File

@ -0,0 +1 @@
declarations-invalid-04.css:1: error: GTK_CSS_PROVIDER_ERROR_SYNTAX

View File

@ -0,0 +1,3 @@
* {
color: rgb(0,255,0);
}

View File

@ -0,0 +1 @@
* { color:red; color:; color:green }

View File

@ -0,0 +1 @@
declarations-invalid-05.css:1: error: GTK_CSS_PROVIDER_ERROR_SYNTAX

View File

@ -0,0 +1,3 @@
* {
color: rgb(0,255,0);
}

View File

@ -0,0 +1 @@
* { color:green; color{;color:maroon} }

View File

@ -0,0 +1 @@
declarations-invalid-06.css:1: error: GTK_CSS_PROVIDER_ERROR_SYNTAX

View File

@ -0,0 +1,3 @@
* {
color: rgb(0,255,0);
}

View File

@ -0,0 +1 @@
* { color:red; color{;color:maroon}; color:green }

View File

@ -0,0 +1 @@
declarations-invalid-07.css:1: error: GTK_CSS_PROVIDER_ERROR_SYNTAX

View File

@ -0,0 +1,3 @@
* {
color: rgb(0,255,0);
}

View File

@ -0,0 +1 @@
* { content: 'Hello

View File

@ -0,0 +1,3 @@
declarations-invalid-08.css:1: error: GTK_CSS_PROVIDER_ERROR_NAME
declarations-invalid-08.css:1: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
declarations-invalid-08.css:2: error: GTK_CSS_PROVIDER_ERROR_SYNTAX

View File

@ -0,0 +1 @@
* {}

View File

@ -0,0 +1 @@
* { font: Sans 15 }

View File

@ -0,0 +1,7 @@
* {
font-family: "Sans";
font-size: 15;
font-style: normal;
font-variant: normal;
font-weight: normal;
}

View File

@ -0,0 +1 @@
* { font: Sans 15; }

View File

@ -0,0 +1,7 @@
* {
font-family: "Sans";
font-size: 15;
font-style: normal;
font-variant: normal;
font-weight: normal;
}

View File

@ -0,0 +1 @@
* { font: bold }

View File

@ -0,0 +1,7 @@
* {
font-family: "Sans";
font-size: 10;
font-style: normal;
font-variant: normal;
font-weight: bold;
}

View File

@ -0,0 +1 @@
* { color: red }

View File

@ -0,0 +1,3 @@
* {
color: rgb(255,0,0);
}

View File

@ -0,0 +1 @@
* { /* just a comment */ }

View File

@ -0,0 +1,3 @@
* { /* multi
line
comment */ }

View File

@ -0,0 +1 @@
* { font: /* comment here */ Sans 15 }

View File

@ -0,0 +1,7 @@
* {
font-family: "Sans";
font-size: 15;
font-style: normal;
font-variant: normal;
font-weight: normal;
}

View File

@ -0,0 +1 @@
* { color: red; background-color: shade (@bg_color, 0.5) }

View File

@ -0,0 +1,4 @@
* {
background-color: shade (@bg_color, 0.5);
color: rgb(255,0,0);
}

View File

@ -0,0 +1 @@
* { margin: 5 }

View File

@ -0,0 +1,6 @@
* {
margin-bottom: 5;
margin-left: 5;
margin-right: 5;
margin-top: 5;
}

View File

@ -0,0 +1 @@
* { margin: 5 10 }

View File

@ -0,0 +1,6 @@
* {
margin-bottom: 5;
margin-left: 10;
margin-right: 10;
margin-top: 5;
}

View File

@ -0,0 +1 @@
* { margin: 5 10 3 }

View File

@ -0,0 +1,6 @@
* {
margin-bottom: 3;
margin-left: 10;
margin-right: 10;
margin-top: 5;
}

View File

@ -0,0 +1 @@
* { margin: 5 10 3 5 }

View File

@ -0,0 +1,6 @@
* {
margin-bottom: 3;
margin-left: 5;
margin-right: 10;
margin-top: 5;
}

View File

@ -0,0 +1 @@
* { padding: 5 }

View File

@ -0,0 +1,6 @@
* {
padding-bottom: 5;
padding-left: 5;
padding-right: 5;
padding-top: 5;
}

View File

@ -0,0 +1 @@
* { padding: 5 10 }

View File

@ -0,0 +1,6 @@
* {
padding-bottom: 5;
padding-left: 10;
padding-right: 10;
padding-top: 5;
}

View File

@ -0,0 +1 @@
* { border-width: 5; border-radius: 10 }

View File

@ -0,0 +1,10 @@
* {
border-bottom-left-radius: 10;
border-bottom-right-radius: 10;
border-bottom-width: 5;
border-left-width: 5;
border-right-width: 5;
border-top-left-radius: 10;
border-top-right-radius: 10;
border-top-width: 5;
}

View File

@ -0,0 +1 @@
* { border-color: #ff00ff }

View File

@ -0,0 +1,6 @@
* {
border-bottom-color: rgb(255,0,255);
border-left-color: rgb(255,0,255);
border-right-color: rgb(255,0,255);
border-top-color: rgb(255,0,255);
}

View File

@ -0,0 +1 @@
* { engine: definitelydoesnotexist }

View File

@ -0,0 +1 @@
declarations-valid-18.css:1: error: GTK_CSS_PROVIDER_ERROR_SYNTAX

View File

@ -0,0 +1,3 @@
* { background-image: -gtk-gradient (linear,
left top, right top,
from (#fff), to (#000)) }

View File

@ -0,0 +1,3 @@
* {
background-image: -gtk-gradient (linear, left top, right top, from (rgb(255,255,255)), to (rgb(0,0,0)));
}

View File

@ -0,0 +1,5 @@
* { background-image: -gtk-gradient (linear,
0.0 0.5, 0.5 1.0,
from (#fff),
color-stop (0.5, #f00),
to (#000)) }

View File

@ -0,0 +1,3 @@
* {
background-image: -gtk-gradient (linear, left center, center bottom, from (rgb(255,255,255)), color-stop (0.5, rgb(255,0,0)), to (rgb(0,0,0)));
}

View File

@ -0,0 +1,6 @@
* { background-image: -gtk-gradient (radial,
center center, 0.25,
center center, 0.75,
color-stop (0.0,#fff),
color-stop (1.0,#000))}

View File

@ -0,0 +1,3 @@
* {
background-image: -gtk-gradient (radial, center center, 0.25, center center, 0.75, from (rgb(255,255,255)), to (rgb(0,0,0)));
}

View File

@ -0,0 +1 @@
* { border-image: url("./test.png") 3 4 3 4 stretch }

View File

@ -0,0 +1,6 @@
* {
border-image-repeat: stretch;
border-image-slice: 3 4;
border-image-source: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAABmJLR0QA/wD/AP+gvaeTAAAAFUlEQVQImQXBAQEAAACAEP9PF1CpMCnkBftPnd1xAAAAAElFTkSuQmCC");
border-image-width: none;
}

View File

@ -0,0 +1 @@
* { border-image: url("./test.png") 3 4 3 4 repeat stretch}

View File

@ -0,0 +1,6 @@
* {
border-image-repeat: repeat stretch;
border-image-slice: 3 4;
border-image-source: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAABmJLR0QA/wD/AP+gvaeTAAAAFUlEQVQImQXBAQEAAACAEP9PF1CpMCnkBftPnd1xAAAAAElFTkSuQmCC");
border-image-width: none;
}

View File

@ -0,0 +1 @@
* { transition: 150ms ease-in-out }

View File

@ -0,0 +1,3 @@
* {
transition: 150ms ease-in-out;
}

View File

@ -0,0 +1 @@
* { transition: 1s linear loop }

View File

@ -0,0 +1,3 @@
* {
transition: 1s linear loop;
}

BIN
tests/css/parser/test.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B