chromium/third_party/blink/web_tests/fast/css/variables/accessing-variable-as-named-property.html

<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<meta charset="UTF-8">

<div id="div"></div>

<script>
test(function() {
  assert_equals(div.style["--foo"], undefined);
  div.style = "--foo: 10px";
  assert_equals(div.style["--foo"], undefined);
  div.style["--foo"] = "20px";
  assert_equals(div.style["--foo"], "20px");
  assert_equals(div.style.getPropertyValue("--foo"), "10px");
}, "Custom properties can't be accessed as named properties on style object");
</script>