chromium/third_party/blink/web_tests/http/tests/serviceworker/resources/fetch-fallback-window.html

<!DOCTYPE html>
<title>Service Worker: Fetch Fallback</title>
<script>
  window.addEventListener('load', e => {
    window.opener.postMessage('LOADED', '*');
  });
  window.addEventListener('message', async e => {
    const { type, handledByFetchHandler } = e.data;
    if (type === 'FETCH_SUBRESOURCE') {
      const path = './blank.html';
      const url = handledByFetchHandler ?
        `${path}?respond-from-service-worker` : path;
      await fetch(url);
      window.opener.postMessage('SUBRESOURCE_LOADED');
    }
  });
</script>