<!DOCTYPE html>
<html>
<head>
  <title>Image load parses URL after microtask runs</title>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
</head>

<body>
<img id="img">
<script>
const t = async_test("An image request's parsed URL should be affected by a " +
                     "dynamically-inserted <base>, if it was inserted before " +
                     "the image request microtask runs");

t.step(() => {
  const elm = document.getElementById