network-partition-worker.js (643B)
1 // This tests the partition key of fetches to subresouce_origin made by the worker and 2 // imported scripts from subresource_origin. 3 importScripts('SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=common/utils.js'); 4 importScripts('SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=resources/testharness.js'); 5 importScripts('SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=fetch/connection-pool/resources/network-partition-key.js'); 6 7 async function fetch_and_reply() { 8 try { 9 await check_partition_ids(); 10 self.postMessage({result: 'success'}); 11 } catch (e) { 12 self.postMessage({result: 'error', details: e.message}); 13 } 14 } 15 fetch_and_reply();