ffsetHeight");
      assert_equals(el.offsetTop + "", el.getAttribute("data-offset-y"), "incorrect offsetTop");
      assert_equals(el.offsetLeft + "", el.getAttribute("data-offset-x"), "incorrect offsetLeft");
    }
  };


  let testNameIndex = 1;
  function getTestName(el) {
    let svg = el.classList.contains("svg") ? " svg" : "";
    return "minmax replaced " + el.nodeName + svg + " " + testNameIndex++;
  };

  function testAfterImageLoads(img, test) {
    let asyncTest = async_test(getTestName(img));
 