 {
      if (worker.state == 'activated')
        resolve();
    });
  });
}

async function runTest() {
  const script = '/service_worker/resources/fetch-service-worker.js';
  const scope = '/service_worker/resources/';
  const client = '/service_worker/resources/simple.html';
  const resource = '/service_worker/resources/data/1K_0.txt';

  const registration = await navigator.serviceWorker.register(
      script, { scope: scope });
  await waitForWorkerActive(registration.installing);
  const frame = awai