diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-05-12 22:04:05 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-05-13 07:36:28 -0400 |
commit | 9a2d6d6d884e18b8f0c0a73e3b8ac886bbaa0803 (patch) | |
tree | 343a270490d38639dd2e4fb883fa5842ae8c2aac /testsuite | |
parent | 72c37d566ca2c873b7c179491a7c65a8fe25176d (diff) | |
download | gtk+-9a2d6d6d884e18b8f0c0a73e3b8ac886bbaa0803.tar.gz |
Improve css parser test coverage
Diffstat (limited to 'testsuite')
15 files changed, 70 insertions, 15 deletions
diff --git a/testsuite/css/parser/meson.build b/testsuite/css/parser/meson.build index dab82dc00e..b59ad993c8 100644 --- a/testsuite/css/parser/meson.build +++ b/testsuite/css/parser/meson.build @@ -499,6 +499,8 @@ test_data = [ 'text-shadow-invalid-but-worked-in-3.12.errors', 'text-shadow-invalid-but-worked-in-3.12.ref.css', 'text-shadow.ref.css', + 'text-transform.css', + 'text-transform.ref.css', 'transform.css', 'transform.ref.css', 'transform-invalid1.css', @@ -568,6 +570,15 @@ test_data = [ 'transition.ref.css', 'transition-timing-function.css', 'transition-timing-function.ref.css', + 'transition-timing-function-invalid.css', + 'transition-timing-function-invalid.errors', + 'transition-timing-function-invalid.ref.css', + 'transition-timing-function-invalid2.css', + 'transition-timing-function-invalid2.errors', + 'transition-timing-function-invalid2.ref.css', + 'transition-timing-function-invalid3.css', + 'transition-timing-function-invalid3.errors', + 'transition-timing-function-invalid3.ref.css', 'url-invalid1.css', 'url-invalid1.errors', 'url-invalid1.ref.css', diff --git a/testsuite/css/parser/text-transform.css b/testsuite/css/parser/text-transform.css new file mode 100644 index 0000000000..1715ab9de9 --- /dev/null +++ b/testsuite/css/parser/text-transform.css @@ -0,0 +1,15 @@ +a { + text-transform: none; +} + +b { + text-transform: lowercase; +} + +c { + text-transform: uppercase; +} + +d { + text-transform: capitalize; +} diff --git a/testsuite/css/parser/text-transform.ref.css b/testsuite/css/parser/text-transform.ref.css new file mode 100644 index 0000000000..1715ab9de9 --- /dev/null +++ b/testsuite/css/parser/text-transform.ref.css @@ -0,0 +1,15 @@ +a { + text-transform: none; +} + +b { + text-transform: lowercase; +} + +c { + text-transform: uppercase; +} + +d { + text-transform: capitalize; +} diff --git a/testsuite/css/parser/transition-timing-function-invalid.css b/testsuite/css/parser/transition-timing-function-invalid.css new file mode 100644 index 0000000000..bf91aa393a --- /dev/null +++ b/testsuite/css/parser/transition-timing-function-invalid.css @@ -0,0 +1,3 @@ +a { + transition-timing-function: cubic-bezier(-1,0,1,2); +} diff --git a/testsuite/css/parser/transition-timing-function-invalid.errors b/testsuite/css/parser/transition-timing-function-invalid.errors new file mode 100644 index 0000000000..53402db37d --- /dev/null +++ b/testsuite/css/parser/transition-timing-function-invalid.errors @@ -0,0 +1 @@ +transition-timing-function-invalid.css:2:44-46: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE diff --git a/testsuite/css/parser/transition-timing-function-invalid.ref.css b/testsuite/css/parser/transition-timing-function-invalid.ref.css new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/css/parser/transition-timing-function-invalid.ref.css diff --git a/testsuite/css/parser/transition-timing-function-invalid2.css b/testsuite/css/parser/transition-timing-function-invalid2.css new file mode 100644 index 0000000000..fe8a7e5b65 --- /dev/null +++ b/testsuite/css/parser/transition-timing-function-invalid2.css @@ -0,0 +1,3 @@ +a { + transition-timing-function: steps(-1); +} diff --git a/testsuite/css/parser/transition-timing-function-invalid2.errors b/testsuite/css/parser/transition-timing-function-invalid2.errors new file mode 100644 index 0000000000..342317af06 --- /dev/null +++ b/testsuite/css/parser/transition-timing-function-invalid2.errors @@ -0,0 +1 @@ +transition-timing-function-invalid2.css:2:37-39: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE diff --git a/testsuite/css/parser/transition-timing-function-invalid2.ref.css b/testsuite/css/parser/transition-timing-function-invalid2.ref.css new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/css/parser/transition-timing-function-invalid2.ref.css diff --git a/testsuite/css/parser/transition-timing-function-invalid3.css b/testsuite/css/parser/transition-timing-function-invalid3.css new file mode 100644 index 0000000000..4ecabd3a4a --- /dev/null +++ b/testsuite/css/parser/transition-timing-function-invalid3.css @@ -0,0 +1,3 @@ +a { + transition-timing-function: steps(3,middle); +} diff --git a/testsuite/css/parser/transition-timing-function-invalid3.errors b/testsuite/css/parser/transition-timing-function-invalid3.errors new file mode 100644 index 0000000000..5a660d0e3b --- /dev/null +++ b/testsuite/css/parser/transition-timing-function-invalid3.errors @@ -0,0 +1 @@ +transition-timing-function-invalid3.css:2:39-45: error: GTK_CSS_PARSER_ERROR_SYNTAX diff --git a/testsuite/css/parser/transition-timing-function-invalid3.ref.css b/testsuite/css/parser/transition-timing-function-invalid3.ref.css new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/css/parser/transition-timing-function-invalid3.ref.css diff --git a/testsuite/css/style/font.css b/testsuite/css/style/font.css index a65f8e3980..b53be43a0c 100644 --- a/testsuite/css/style/font.css +++ b/testsuite/css/style/font.css @@ -26,6 +26,7 @@ box { font-feature-settings: normal; font-kerning: normal; font-size: 10px; + font-weight: bolder; line-height: 12px; } diff --git a/testsuite/css/style/font.nodes b/testsuite/css/style/font.nodes index ab89cb0349..cf4719fbeb 100644 --- a/testsuite/css/style/font.nodes +++ b/testsuite/css/style/font.nodes @@ -29,7 +29,7 @@ window.background:dir(ltr) font-size: 10px; /* font.css:28:3-19 */ font-family: "serif"; /* font.css:20:3-41 */ font-style: oblique; /* font.css:20:3-41 */ - font-weight: 400; /* font.css:20:3-41 */ + font-weight: 700; /* font.css:29:3-23 */ font-stretch: expanded; /* font.css:20:3-41 */ font-kerning: normal; /* font.css:27:3-24 */ font-variant-position: normal; /* font.css:24:3-33 */ @@ -38,18 +38,18 @@ window.background:dir(ltr) font-variant-alternates: normal; /* font.css:23:3-35 */ font-feature-settings: normal; /* font.css:26:3-33 */ font-variation-settings: normal; /* font.css:25:3-35 */ - line-height: 12px; /* font.css:29:3-21 */ + line-height: 12px; /* font.css:30:3-21 */ label#label5:dir(ltr) - font-size: 12px; /* font.css:41:3-21 */ - font-family: "21st Century"; /* font.css:33:3-29 */ - font-style: normal; /* font.css:33:3-29 */ - font-weight: 400; /* font.css:33:3-29 */ - font-stretch: normal; /* font.css:33:3-29 */ - font-kerning: auto; /* font.css:40:3-22 */ - font-variant-position: super; /* font.css:37:3-32 */ - font-variant-caps: unicase; /* font.css:34:3-30 */ - font-variant-numeric: tabular-nums diagonal-fractions; /* font.css:35:3-57 */ - font-variant-alternates: historical-forms; /* font.css:36:3-45 */ - font-feature-settings: "dlig" 0, "tnum" 0, "liga" 1, "ss01" 1; /* font.css:39:3-68 */ - font-variation-settings: "slnt" 1, "wght" 300; /* font.css:38:3-49 */ - line-height: 14.399999999999999px; /* font.css:42:3-21 */ + font-size: 12px; /* font.css:42:3-21 */ + font-family: "21st Century"; /* font.css:34:3-29 */ + font-style: normal; /* font.css:34:3-29 */ + font-weight: 400; /* font.css:34:3-29 */ + font-stretch: normal; /* font.css:34:3-29 */ + font-kerning: auto; /* font.css:41:3-22 */ + font-variant-position: super; /* font.css:38:3-32 */ + font-variant-caps: unicase; /* font.css:35:3-30 */ + font-variant-numeric: tabular-nums diagonal-fractions; /* font.css:36:3-57 */ + font-variant-alternates: historical-forms; /* font.css:37:3-45 */ + font-feature-settings: "dlig" 0, "tnum" 0, "liga" 1, "ss01" 1; /* font.css:40:3-68 */ + font-variation-settings: "slnt" 1, "wght" 300; /* font.css:39:3-49 */ + line-height: 14.399999999999999px; /* font.css:43:3-21 */ diff --git a/testsuite/css/transition.c b/testsuite/css/transition.c index 7f9249e537..2795c36311 100644 --- a/testsuite/css/transition.c +++ b/testsuite/css/transition.c @@ -107,6 +107,7 @@ typedef struct { static ValueTransitionTest tests[] = { { GTK_CSS_PROPERTY_COLOR, "transparent", "rgb(255,0,0)", 0.25, "rgba(255,0,0,0.25)" }, + { GTK_CSS_PROPERTY_COLOR, "alpha(red, 0.2)", "alpha(rgb(255,0,0),0.8)", 0.5, "rgba(255,0,0,0.5)" }, { GTK_CSS_PROPERTY_BOX_SHADOW, "none", "2px 2px 10px 4px rgb(200,200,200)", 0.5, "1px 1px 5px 2px rgba(200,200,200,0.5)" }, { GTK_CSS_PROPERTY_BOX_SHADOW, "2px 2px 10px 4px rgb(200,200,200)", "none", 0.5, "1px 1px 5px 2px rgba(200,200,200,0.5)" }, { GTK_CSS_PROPERTY_BOX_SHADOW, "2px 2px 10px 4px rgb(200,200,200), 0px 10px 8px 6px rgb(200,100,0)", "none", 0.5, "1px 1px 5px 2px rgba(200,200,200,0.5), 0px 5px 4px 3px rgba(200,100,0,0.5)" }, |