summaryrefslogtreecommitdiffstats
path: root/dom/media/tests/crashtests/1429507_1.html
blob: 4290fe721a214d9747fd9b5001460f4fa725c253 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<html class="reftest-wait">
  <body>
    <script>
      let o1;
      let p1, p2;
      window.addEventListener("MozReftestInvalidate", finish);
      try { o1 = window.open("") } catch (e) {}
      try { o1.location.reload() } catch (e) {}
      try { o2 = new RTCPeerConnection({iceServers: [{"url": "stun:d"}]}) } catch (e) {}
      try { p1 = o1.navigator.mediaDevices.getUserMedia({video: true, fake: true}).catch((error) => {}) } catch (e) {}
      try { o2.createOffer({offerToReceiveVideo: true}).then((offer) => {
        try { p2 = o1.navigator.mediaDevices.getUserMedia({video: true}) } catch (e) {};
      }) } catch (e) {}

      async function finish() {
        try {
          await p1;
        } catch (e) {}
        try {
          await p2;
        } catch (e) {}
        try {
          o1.close();
        } catch (e) {}
        document.documentElement.className = "";
      }
    </script>
  </body>
</html>