chromium/third_party/blink/web_tests/external/wpt/css/filter-effects/parsing/backdrop-filter-computed.html

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Filter Effects Module Level 2: getComputedStyle().backdropFilter</title>
<link rel="author" title="Eric Willigers" href="mailto:[email protected]">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
<meta name="assert" content="backdrop-filter supports omitted arguments'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<style>
  #target {
    color: lime;
  }
</style>
<div id="target"></div>
<script>
test_computed_value("backdrop-filter", "none");

test_computed_value("backdrop-filter", "blur(100px)");
test_computed_value("backdrop-filter", "blur()", "blur(0px)");

test_computed_value("backdrop-filter", "brightness(0)");
test_computed_value("backdrop-filter", "brightness(300%)", "brightness(3)");
test_computed_value("backdrop-filter", "brightness()", "brightness(1)");

test_computed_value("backdrop-filter", "contrast(0)");
test_computed_value("backdrop-filter", "contrast(300%)", "contrast(3)");
test_computed_value("backdrop-filter", "contrast()", "contrast(1)");

test_computed_value("backdrop-filter", "drop-shadow(1px 2px)", "drop-shadow(rgb(0, 255, 0) 1px 2px 0px)");
test_computed_value("backdrop-filter", "drop-shadow(rgb(4, 5, 6) 1px 2px 0px)");

test_computed_value("backdrop-filter", "grayscale(50%)", "grayscale(0.5)");
test_computed_value("backdrop-filter", "grayscale()", "grayscale(1)");

test_computed_value("backdrop-filter", "hue-rotate(90deg)");
test_computed_value("backdrop-filter", "hue-rotate()", "hue-rotate(0deg)");

test_computed_value("backdrop-filter", "invert(0)");
test_computed_value("backdrop-filter", "invert(100%)", "invert(1)");
test_computed_value("backdrop-filter", "invert()", "invert(1)");

test_computed_value("backdrop-filter", "opacity(0)");
test_computed_value("backdrop-filter", "opacity(100%)", "opacity(1)");
test_computed_value("backdrop-filter", "opacity()", "opacity(1)");

test_computed_value("backdrop-filter", "saturate(0)");
test_computed_value("backdrop-filter", "saturate(300%)", "saturate(3)");
test_computed_value("backdrop-filter", "saturate()", "saturate(1)");

test_computed_value("backdrop-filter", "sepia(0)");
test_computed_value("backdrop-filter", "sepia(100%)", "sepia(1)");
test_computed_value("backdrop-filter", "sepia()", "sepia(1)");

test_computed_value("backdrop-filter", 'blur(10px) url("https://www.example.com/picture.svg#f") contrast(20) brightness(30)');
</script>
</body>
</html>