function keepaliveSimpleRequestTest(method) {
  for (const evt of ['load', 'unload', 'pagehide']) {
    const desc =
        `[keepalive] simple ${method} request on '${evt}' [no payload]`;
    promise_test(async (test) => {
      const token1 = token();
      const iframe = document.createElement('iframe');
      iframe.src = getKeepAliveIframeUrl(token1, method, {sendOn: evt});
      document.body.appendChild(iframe);
      await iframeLoaded(iframe);
      if (evt != 'load') {
        iframe.remove();
      }

      assertStashedTokenAsync(desc, token1);
    }, `${desc}; setting up`);
  }
}
In a different-site iframe, test to fetch a keepalive URL on the specified
document event.