cache-response-clone.https.html (658B)
1 <!DOCTYPE html> 2 <html class="test-wait"> 3 <meta charset="utf-8"> 4 <script type="module"> 5 const cache = await window.caches.open('cache_name_0') 6 await cache.add("") 7 const resp1 = await cache.match("") 8 const readStream = resp1.body 9 // Cloning will open the stream via NS_AsyncCopy in Gecko 10 resp1.clone() 11 // Give a little bit of time 12 await new Promise(setTimeout) 13 // At this point the previous open operation is about to finish but not yet. 14 // It will finish after the second open operation is made, potentially causing incorrect state. 15 await readStream.getReader().read(); 16 document.documentElement.classList.remove('test-wait') 17 </script>