summaryrefslogtreecommitdiffstats
path: root/dom/media/tests/crashtests/datachannel-oom.html
blob: e55ec651bed8421fc9c9f49f3bee2f3b3a000524 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <title></title>
  <script type="application/javascript">
    function start() {
      var size = 2147483638;
      new RTCPeerConnection().createDataChannel('a').send(new Uint8Array(size));
      var a = "a";
      var count = Math.floor(Math.log2(size)) - 1;
      for (var i = 0; i < count; i++) {
        a += a;
      }
      new RTCPeerConnection().createDataChannel('a').send(a)
    }
  </script>
</head>

<body onload="start()">
</body>
</html>