1'use strict'; 2importScripts('/resources/testharness.js', 'helpers.js'); 3 4onconnect = evt => { 5 const port = evt.source; 6 const promise = testMessageEvent(port); 7 port.start(); 8 promise 9 .then(() => port.postMessage('OK')) 10 .catch(err => port.postMessage(`BAD: ${err}`)); 11}; 12