// Any MIME type allowed
assert_worker_sends_pass('application/javascript MIME allowed', 'application/javascript', 'port.postMessage("PASS")');
assert_worker_sends_pass('text/plain MIME allowed', 'text/plain', 'port.postMessage("PASS")');
assert_worker_sends_pass('empty MIME allowed', '', 'port.postMessage("PASS")');
// Communications goes both ways
assert_worker_sends_pass('communication goes both ways', 'application/javascript', 'port.onmessage = function(e) { port.postMessage("PASS"); }');
// test access to storage APIs
// https://w3c.github.io/IndexedDB/#dom-idbfactory-open
assert_worker_sends_pass('indexedDB is present', '', 'port.postMessage("indexedDB" in self ? "PASS" : "FAIL")');
assert_worker_throws('indexedDB is inaccessible', 'self.indexedDB.open("someDBName")');
// Other standardized storage APIs are either not exposed to workers
// (e.g. window.localStorage, window.sessionStorage), or are [SecureContext]
// (e.g. self.caches).