wpt / css / filter-effects / parsing / filter-parsing-invalid.html

Status: PASS | Duration: 63ms | Subtests: 25/25 | 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['filter'] = "auto" should not set the property valuePASS
e.style['filter'] = "none hue-rotate(0deg)" should not set the property valuePASS
e.style['filter'] = "blur(10)" should not set the property valuePASS
e.style['filter'] = "blur(-100px)" should not set the property valuePASS
e.style['filter'] = "brightness(-20)" should not set the property valuePASS
e.style['filter'] = "brightness(30px)" should not set the property valuePASS
e.style['filter'] = "contrast(-20)" should not set the property valuePASS
e.style['filter'] = "contrast(30px)" should not set the property valuePASS
e.style['filter'] = "drop-shadow(10 20)" should not set the property valuePASS
e.style['filter'] = "drop-shadow(10% 20%)" should not set the property valuePASS
e.style['filter'] = "drop-shadow(1px)" should not set the property valuePASS
e.style['filter'] = "drop-shadow(1px 2px 3px 4px)" should not set the property valuePASS
e.style['filter'] = "drop-shadow(rgb(4, 5, 6))" should not set the property valuePASS
e.style['filter'] = "drop-shadow()" should not set the property valuePASS
e.style['filter'] = "grayscale(-20)" should not set the property valuePASS
e.style['filter'] = "grayscale(30px)" should not set the property valuePASS
e.style['filter'] = "hue-rotate(90)" should not set the property valuePASS
e.style['filter'] = "invert(-20)" should not set the property valuePASS
e.style['filter'] = "invert(30px)" should not set the property valuePASS
e.style['filter'] = "opacity(-20)" should not set the property valuePASS
e.style['filter'] = "opacity(30px)" should not set the property valuePASS
e.style['filter'] = "saturate(-20)" should not set the property valuePASS
e.style['filter'] = "saturate(30px)" should not set the property valuePASS
e.style['filter'] = "sepia(-20)" should not set the property valuePASS
e.style['filter'] = "sepia(30px)" should not set the property valuePASS

/css/filter-effects/parsing/filter-parsing-invalid.html

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Filter Effects Module Level 1: parsing filter with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects/#FilterProperty">
<meta name="assert" content="filter supports only the grammar 'none | <filter-function-list>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
// Edge fails: expected "" but got "none"

test_invalid_value("filter", "auto");
test_invalid_value("filter", "none hue-rotate(0deg)");

test_invalid_value("filter", "blur(10)");
test_invalid_value("filter", "blur(-100px)");

test_invalid_value("filter", "brightness(-20)"); // crbug.com/776208 Blink/WebKit accept negative brightness.
test_invalid_value("filter", "brightness(30px)");

test_invalid_value("filter", "contrast(-20)");
test_invalid_value("filter", "contrast(30px)");

test_invalid_value("filter", "drop-shadow(10 20)");
test_invalid_value("filter", "drop-shadow(10% 20%)");
test_invalid_value("filter", "drop-shadow(1px)");
test_invalid_value("filter", "drop-shadow(1px 2px 3px 4px)");
test_invalid_value("filter", "drop-shadow(rgb(4, 5, 6))");
test_invalid_value("filter", "drop-shadow()");

test_invalid_value("filter", "grayscale(-20)");
test_invalid_value("filter", "grayscale(30px)");

test_invalid_value("filter", "hue-rotate(90)");

test_invalid_value("filter", "invert(-20)");
test_invalid_value("filter", "invert(30px)");

test_invalid_value("filter", "opacity(-20)");
test_invalid_value("filter", "opacity(30px)");

test_invalid_value("filter", "saturate(-20)");
test_invalid_value("filter", "saturate(30px)");

test_invalid_value("filter", "sepia(-20)");
test_invalid_value("filter", "sepia(30px)");
</script>
</body>
</html>