<style>
  img {
    top: 0;
    bottom: 0;
    aspect-ratio: 1;
    max-width: fit-content;
    position: absolute;
  }
</style>
<img src="broken">
PASS if no crash.
<script>
if (window.testRunner)
  testRunner.dumpAsText();
</script>
