<!DOCTYPE html>
<meta charset=utf-8>
<title>iframe used in clientId test</title>
<script>

self.onmessage = async event => {
  try {
    if (event.data === 'get_sw_client_id') {
      // Use the controlling service worker to determine
      // this client's id according to the Service Worker.
      const response = await fetch('/clientId');
      const data = await response.json();
      window.parent.postMessage(data.clientId, '*');
      return;
    }

    if (event.data === 'get_lock_client_id') {
      