From ea2b5d588b7edad220554a229c815b5bc2ff2dee Mon Sep 17 00:00:00 2001 From: Robin Linden Date: Tue, 31 Oct 2023 23:13:51 +0100 Subject: [PATCH] css: Add test for invalid vertical border radius --- css/parser_test.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/css/parser_test.cpp b/css/parser_test.cpp index e0ce9cf3..93ddd405 100644 --- a/css/parser_test.cpp +++ b/css/parser_test.cpp @@ -876,6 +876,19 @@ int main() { }); }); + etest::test("parser: border-radius, invalid vertical, separate horizontal and vertical", [] { + auto rules = css::parse("div { border-radius: 5px / 10px 15px 20px 25px 30px; }").rules; + require(rules.size() == 1); + auto const &div = rules[0]; + expect_eq(div.declarations, + std::map{ + {css::PropertyId::BorderTopLeftRadius, "5px"s}, + {css::PropertyId::BorderTopRightRadius, "5px"s}, + {css::PropertyId::BorderBottomRightRadius, "5px"s}, + {css::PropertyId::BorderBottomLeftRadius, "5px"s}, + }); + }); + etest::test("parser: @keyframes doesn't crash the parser", [] { auto css = R"( @keyframes toast-spinner {