y") {
        resolve();
      }
    }));
  });

  assert_equals(w.history.length, 2, "history.length must increase");
  assert_equals(w.location.href, absoluteAfterReplacementURL);

  const promise = new Promise(resolve => {
    window.addEventListener("message", t.step_func(e => {
      assert_equals(e.data, "arrived at start URL");
      resolve();
    }));
  });

  w.history.back();

  await promise;
  assert_equals(w.location.href, absoluteStartURL, "1 second after attempting to go back, it indeed went