tingHistoryLength = history.length;
  // Create an iframe with src set to URL that doesn't load a new document, so
  // it will stay on the initial empty document.
  const iframe = insertIframeWith204Src(t);
  assert_equals(history.length, startingHistoryLength,
    "Inserting iframe with src set to URL that doesn't load a new document must not change history.length");

  // Do a history.replaceState() to about:blank#foo.
  let replaceURL = "about:blank#foo";
  iframe.contentWindow.history.replaceState({}, 