summaryrefslogtreecommitdiffstats
path: root/dom/base/test/fullscreen/file_fullscreen-denied-inner.html
blob: 6b5916b2e2191061843bcca8c4416680057a341e (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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body onload="doRequestFullscreen()">
<script>
function doRequestFullscreen() {
  function handler(evt) {
    document.removeEventListener("fullscreenchange", handler);
    document.removeEventListener("fullscreenerror", handler);
    parent.is(evt.type, "fullscreenerror", "Request from " +
              `document inside ${parent.testTargetName} should be denied`);
    parent.continueTest();
  }
  parent.ok(!document.fullscreenEnabled, "Fullscreen " +
            `should not be enabled in ${parent.testTargetName}`);
  document.addEventListener("fullscreenchange", handler);
  document.addEventListener("fullscreenerror", handler);
  document.documentElement.requestFullscreen();
}
</script>
</body>
</html>