chromium/third_party/blink/web_tests/fast/canvas/draw-focus-if-needed-invisible-crash.html

<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
    
<canvas id="canvas">
    <button id="button"></button>
</canvas>

<script>
test(function(t) {

    var button = document.getElementById("button");
    button.focus();
    var canvas = document.getElementById("canvas")
    var ctx = canvas.getContext("2d");
    ctx.rect(0, 0, 10, 10);
    canvas.style.display = "none";
    ctx.drawFocusIfNeeded(button);
    
}, 'Test that drawFocusIfNeeded does not crash.');
</script>