chromium/third_party/blink/web_tests/http/tests/serviceworker/resources/dynamic-import-worker.js

onmessage = event => {
  const source = event.source;
  import('empty-worker.js')
      .catch(e => source.postMessage({ name: e.name, message: e.message }));
};