Bug 1776738: Make fullscreen and pointerlock mochitests use document.fullscreenElemen...
commit1c8e1b829f2ae8febd9e5c05f3a5c09db2ba9057
authorBrad Werth <bwerth@mozilla.com>
Mon, 24 Apr 2023 17:59:39 +0000 (24 17:59 +0000)
committerBrad Werth <bwerth@mozilla.com>
Mon, 24 Apr 2023 17:59:39 +0000 (24 17:59 +0000)
tree9c5376ab0ebe6b0eeb18f5392ebced4ac3006888
parent562799d5e56dff20a80a0cb10ca39ccd7b7c815e
Bug 1776738: Make fullscreen and pointerlock mochitests use document.fullscreenElement to determine fullscreen-ness. r=edgar

With these changes, it's no longer necessary to store the normalSize on
the window, since we never check it, nor check for resize events. This
also removes the flaky timeouts, and replaces them with an executeSoon.

For some of the fullscreen tests, the number of calls to enter and exit
fullscreen are not matched. Since that count is essential for the checks
of whether or not the screen is in the expected fullscreen, this defines a
method that can force the count to a specific value. This is used in some
of the fullscreen tests to get the expected results.

Differential Revision: https://phabricator.services.mozilla.com/D172852
dom/base/test/fullscreen/file_fullscreen-denied.html
dom/base/test/fullscreen/file_fullscreen-multiple-inner.html
dom/base/test/fullscreen/file_fullscreen-multiple.html
dom/base/test/fullscreen/file_fullscreen-nested.html
dom/base/test/fullscreen/file_fullscreen-rollback.html
dom/base/test/fullscreen/file_fullscreen-scrollbar.html
dom/base/test/fullscreen/file_fullscreen-selector.html
dom/base/test/fullscreen/file_fullscreen-utils.js
dom/tests/mochitest/pointerlock/pointerlock_utils.js