chromium/third_party/blink/web_tests/http/tests/devtools/extensions/resources/extensions-network-redirect.html

<script>
var requestDone = false;

function doRequest(force) {
  // Only do request once per test suite, to make tests independent on each other.
  // Returns true iff request is alredy done (so the caller shouldn't wait for onFinished).
  if (requestDone && !force)
    return true;
  requestDone = true;
  // We can't use XHR here -- the content for XHRs is pushed from back-end.
  var iframe = document.createElement("iframe");
  iframe.src = "/loading/resources/redirect-methods-result.php?status=302";
  document.body.appendChild(iframe);
  return false;
}
</script>