t.
    t.step_timeout(t.step_func_done(() => {
      const window_opened_from_form = window.open("", "does-not-exist");
      assert_equals(document.referrer, expected_referrer);
    }));
  });
}, "A new frame's document.referrer is correct even if its initiator frame is gone");
</script>
