summaryrefslogtreecommitdiffstats
path: root/dom/media/tests/crashtests/1490700.html
blob: ea881c30961dc13b20c95068bd4afd63af377023 (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
<!DOCTYPE html>
<html class="reftest-wait">
<head>
  <title>Bug 1490700 - Divide-by-zero for screen-capture with max-dimension 0</title>
</head>
</body>
<script type="application/javascript">
async function test() {
  SpecialPowers.wrap(document).notifyUserGestureActivation();
  await window.navigator.mediaDevices.getUserMedia({
    video: {
      mediaSource: 'screen',
      height: {max: 0},
    },
  });
  await window.navigator.mediaDevices.getUserMedia({
    video: {
      mediaSource: 'screen',
      advanced: [{height: 0}],
    },
  });
  document.documentElement.removeAttribute("class");
}

test();
</script>
</body>
</html>