<!doctype html>
<title>self.name</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(t => {
  const worker = new SharedWorker('name.js', 'hello');
  worker.port.onmessage = t.step_func_done(e => {
    assert_equals(e.data, 'hello');
  });
}, 'Test self.name in a shared worker');
</script>
