"title", replaceURL);
  assert_equals(iframe.contentWindow.location.href, replaceURL);
  assert_equals(history.length, startingHistoryLength,
    "history.length must not change after history.replaceState() on the initial empty document");

  // Navigate away from the initial empty document. This should do replacement.
  iframe.src = crossDocumentURL;
  await waitForLoad(t, iframe, crossDocumentURL);
  assert_equals(history.length, startingHistoryLength,
    "history.length must not change after normal navi