diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /dom/base/test/fullscreen/file_fullscreen-lenient-setters.html | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/base/test/fullscreen/file_fullscreen-lenient-setters.html')
-rw-r--r-- | dom/base/test/fullscreen/file_fullscreen-lenient-setters.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/dom/base/test/fullscreen/file_fullscreen-lenient-setters.html b/dom/base/test/fullscreen/file_fullscreen-lenient-setters.html new file mode 100644 index 0000000000..02491c177e --- /dev/null +++ b/dom/base/test/fullscreen/file_fullscreen-lenient-setters.html @@ -0,0 +1,61 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="UTF-8"> + <title>Test for Bug 1268798</title> + <script src="/tests/SimpleTest/EventUtils.js"></script> + <script src="/tests/SimpleTest/SimpleTest.js"></script> +</head> +<body> +<script> +"use strict"; + +function ok(condition, msg) { + opener.ok(condition, "[lenient-setters] " + msg); +} + +function is(a, b, msg) { + opener.is(a, b, "[lenient-setters] " + msg); +} + +function info(msg) { + opener.info("[lenient-setters] " + msg); +} + +let unattachedDiv = document.createElement("div"); + +function begin() { + var originalValue = document.fullscreen; + try { + document.fullscreen = !document.fullscreen; + is(document.fullscreen, originalValue, + "fullscreen should not be changed"); + } catch (e) { + ok(false, "Setting fullscreen should not throw"); + } + + var originalElem = document.fullscreenElement; + try { + document.fullscreenElement = unattachedDiv; + document.fullscreenElement = []; + is(document.fullscreenElement, originalElem, + "fullscreenElement should not be changed"); + } catch (e) { + ok(false, "Setting fullscreenElement should not throw"); + } + + var originalEnabled = document.fullscreenEnabled; + try { + document.fullscreenEnabled = !originalEnabled; + is(document.fullscreenEnabled, originalEnabled, + "fullscreenEnabled should not be changed"); + } catch (e) { + ok(false, "Setting fullscreenEnabled should not throw"); + } + + opener.nextTest(); +} + +</script> +</body> +</html> |