diff options
Diffstat (limited to 'dom/base/test/file_lock_orientation_with_pending_fullscreen.html')
-rw-r--r-- | dom/base/test/file_lock_orientation_with_pending_fullscreen.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dom/base/test/file_lock_orientation_with_pending_fullscreen.html b/dom/base/test/file_lock_orientation_with_pending_fullscreen.html new file mode 100644 index 0000000000..07af0fc67d --- /dev/null +++ b/dom/base/test/file_lock_orientation_with_pending_fullscreen.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<head> +<meta charset="utf-8"> +<link rel="stylesheet" href="/tests/SimpleTest/test.css"/> +</head> +<script> +const ok = window.parent.ok; +const SpecialPowers = window.parent.SpecialPowers; + +async function runTest() { + SpecialPowers.wrap(document.documentElement).requestFullscreen(); + const currentType = window.screen.orientation.type; + const lockPromise = window.screen.orientation.lock(currentType.startsWith("landscape") ? "portrait" : "landscape"); + ok(true, "lock orientation doesn't throw error at this time"); + // This document will be detached by "pending" message. + parent.postMessage("pending", "*"); + await lockPromise; +} +</script> +<body onload="runTest()"> +</body> +</html> |