mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 18:26:15 +00:00
ec4136b39b
Differential Revision: https://phabricator.services.mozilla.com/D10723 --HG-- extra : moz-landing-system : lando
29 lines
887 B
HTML
29 lines
887 B
HTML
<!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);
|
|
if (evt.type == "fullscreenchange") {
|
|
document.addEventListener("fullscreenchange", () => parent.continueTest(evt.type), {once: true});
|
|
document.exitFullscreen();
|
|
} else {
|
|
parent.continueTest(evt.type);
|
|
}
|
|
}
|
|
parent.ok(document.fullscreenEnabled, "Fullscreen " +
|
|
`should be enabled in ${parent.testTargetName}`);
|
|
document.addEventListener("fullscreenchange", handler);
|
|
document.addEventListener("fullscreenerror", handler);
|
|
parent.opener.info("Requesting fullscreen");
|
|
document.documentElement.requestFullscreen();
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|