Skip to content

Commit

Permalink
css: Add test for invalid vertical border radius
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlinden committed Oct 31, 2023
1 parent 3c93f50 commit ea2b5d5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions css/parser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, std::string>{
{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 {
Expand Down

0 comments on commit ea2b5d5

Please sign in to comment.