wpt / css / css-backgrounds / parsing / border-image-invalid.html

Status: PASS | Duration: 58ms | Subtests: 17/17 | Open test on wpt.live | wpt.fyi

Data from commit:
a50cb89 wpt: run reference-named files which are themselves tests (#836) (2026-09-03)

SubtestStatusMessage
e.style['border-image'] = "auto" should not set the property valuePASS
e.style['border-image'] = "none, url(\"http://www.example.com/\")" should not set the property valuePASS
e.style['border-image'] = "stretch repeat round" should not set the property valuePASS
e.style['border-image'] = "fill" should not set the property valuePASS
e.style['border-image'] = "1 2 3 4 5" should not set the property valuePASS
e.style['border-image'] = "1% fill 2%" should not set the property valuePASS
e.style['border-image'] = "1 / -2px" should not set the property valuePASS
e.style['border-image'] = "-1 / 2px" should not set the property valuePASS
e.style['border-image'] = "1 / 1 2 3 4 5" should not set the property valuePASS
e.style['border-image'] = "1 2 3 4 5 / / 1px" should not set the property valuePASS
e.style['border-image'] = "1 / / auto" should not set the property valuePASS
e.style['border-image'] = "1 2% 3 4% / / 1%" should not set the property valuePASS
e.style['border-image'] = "1 2% 3 4% fill / / 1 2 3 4 5" should not set the property valuePASS
e.style['border-image'] = "1 / none / 1px" should not set the property valuePASS
e.style['border-image'] = "1 2% 3 4% / 1 2 3 4 5 / 2" should not set the property valuePASS
e.style['border-image'] = "1 2 3 4 5 / 1px / 1px" should not set the property valuePASS
e.style['border-image'] = "1 / 1px / auto" should not set the property valuePASS

/css/css-backgrounds/parsing/border-image-invalid.html

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Backgrounds and Borders Module Level 3: parsing border-image with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#border-image">
<meta name="assert" content="border-image supports only the grammar ' <‘border-image-source’> || <‘border-image-slice’> [ / <‘border-image-width’> | / <‘border-image-width’>? / <‘border-image-outset’> ]? || <‘border-image-repeat’>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("border-image", "auto");
test_invalid_value("border-image", 'none, url("http://www.example.com/")');

test_invalid_value("border-image", "stretch repeat round");

test_invalid_value("border-image", "fill");
test_invalid_value("border-image", "1 2 3 4 5");
test_invalid_value("border-image", "1% fill 2%");

test_invalid_value("border-image", "1 / -2px");
test_invalid_value("border-image", "-1 / 2px");

test_invalid_value("border-image", "1 / 1 2 3 4 5");

test_invalid_value("border-image", "1 2 3 4 5 / / 1px");
test_invalid_value("border-image", "1 / / auto");
test_invalid_value("border-image", "1 2% 3 4% / / 1%");
test_invalid_value("border-image", "1 2% 3 4% fill / / 1 2 3 4 5");

test_invalid_value("border-image", "1 / none / 1px");
test_invalid_value("border-image", "1 2% 3 4% / 1 2 3 4 5 / 2");
test_invalid_value("border-image", "1 2 3 4 5 / 1px / 1px");
test_invalid_value("border-image", "1 / 1px / auto");
</script>
</body>
</html>