has-iframe.html", t);
  const iframe = w.document.querySelector("iframe");

  await waitToAvoidReplace(t);
  iframe.srcdoc = srcdocThatPostsParentOpener("srcdoc1");
  await waitForMessage(iframe.contentWindow);

  assert_equals(w.history.length, 2);

  // Now navigate to about:srcdoc#yo
  iframe.contentWindow.location.href = "about:srcdoc#yo";
  assert_equals(iframe.contentWindow.location.href, "about:srcdoc#yo");
  assert_equals(w.history.length, 3);

  // Now navigate to a different srcdoc
  iframe.srcdoc