1429507_1.html (1272B)
1 <html class="reftest-wait"> 2 <body> 3 <script> 4 let o1; 5 let p1, p2; 6 window.addEventListener("MozReftestInvalidate", finish); 7 // Synchronously call reload while an async load away from the initial about:blank is ongoing. 8 // This causes the window to be reused and a navigation event to mess with the gUM request. 9 try { o1 = window.open("/") } catch (e) {} 10 // Note: window.open can fail here in some configurations, so o1 might be null. 11 // But the try/catch silence that (bug 2002313). 12 try { o1.location.reload() } catch (e) {} 13 try { o2 = new RTCPeerConnection({iceServers: [{"url": "stun:d"}]}) } catch (e) {} 14 try { p1 = o1.navigator.mediaDevices.getUserMedia({video: true, fake: true}).catch((error) => {}) } catch (e) {} 15 try { o2.createOffer({offerToReceiveVideo: true}).then((offer) => { 16 try { p2 = o1.navigator.mediaDevices.getUserMedia({video: true}) } catch (e) {}; 17 }) } catch (e) {} 18 19 async function finish() { 20 try { 21 await p1; 22 } catch (e) {} 23 try { 24 await p2; 25 } catch (e) {} 26 try { 27 o1.close(); 28 } catch (e) {} 29 document.documentElement.className = ""; 30 } 31 </script> 32 </body> 33 </html>