me.contentWindow);
  assert_equals(w.history.length, 2,
    "history.length must not change since it was a replace");
  assert_equals(
    iframe.contentDocument.querySelector("p").textContent,
    "srcdoc2",
    "Sanity check: the srcdoc document did indeed update"
  );
}, "changing srcdoc does a replace navigation since the URL is still " +
   "about:srcdoc");

promise_test(async t => {
  // Set up a window whose iframe contains [normal page, srcdoc] entries.
  const w = await openWindow("../../resources/