1429507_2.html (1336B)
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 = o1.navigator } catch(e) { } 14 try { o3 = o2.mediaDevices } catch(e) { } 15 try { o4 = new XMLHttpRequest() } catch(e) { } 16 try { p1 = o3.getUserMedia({video: true, fake: true }).then((stream) => {}).catch((error) => {}) } catch (e) {} 17 try { o4.open("T", "aa", false) } catch(e) { } 18 try { o4.send() } catch(e) { } 19 try { p2 = o3.getUserMedia({video: true}).then((stream) => {}).catch((error) => {}) } catch (e) {} 20 21 async function finish() { 22 try { 23 await p1; 24 } catch (e) {} 25 try { 26 await p2; 27 } catch (e) {} 28 try { 29 o1.close(); 30 } catch (e) {} 31 document.documentElement.className = ""; 32 } 33 </script> 34 </body> 35 </html>