<!doctype html>
<title>connect event</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(t => {
  const worker = new SharedWorker('connect-event.js');
  worker.port.onmessage = t.step_func_done(e => {
    assert_true(e.data[0], "e.data === ''");
    assert_true(e.data[1], "e instanceof MessageEvent");
    assert_true(e.data[2], "e.ports.length == 1");
  });
}, 'Test connect event for a shared worker');
</script>
