d;
}
#container {
  display: inline-flex;
  height: 50px;
  background: green;
}
#target {
  height:100%;
  display:block;
}
</style>
<div id="outer">
  <div id="container">
    <img id="target" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">
  </div>
</div>
<script>
test(() => {
  let target = document.querySelector("#target");
  assert_equals(target.offsetWidth, target.offsetHeight);
  assert_equals(target.offsetWidth, target.parentNode.offsetWidth);
  assert_equals(t