1 self.onmessage = function(e) {
3 if ('port' in message) {
12 'http://www.example.com/foo'
15 function doNextFetchTest(port) {
16 if (testTargets.length == 0) {
17 port.postMessage('quit');
18 // Destroying the execution context while fetch is happening should not cause a crash.
19 fetch('dummy.html').then(function() {}).catch(function() {});
23 var target = testTargets.shift();
26 port.postMessage('Resolved: ' + target);
27 doNextFetchTest(port);
28 }).catch(function(e) {
29 port.postMessage('Rejected: ' + target + ' : '+ e.message);
30 doNextFetchTest(port);