| <!DOCTYPE html> |
| <style> |
| html, |
| body { |
| margin: 0px; |
| } |
| </style> |
| <title>fullscreen root block sizing</title> |
| <!-- This page intentionally has no content. It needs to have |
| no width or height. This is to ensure that the root element |
| gets sizing in fullscreen mode as it does in as it does not |
| in fullscreen mode. |
| --> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="/resources/testdriver.js"></script> |
| <script src="/resources/testdriver-vendor.js"></script> |
| <script src="../trusted-click.js"></script> |
| <body></body> |
| <script> |
| promise_test(async (t) => { |
| t.add_cleanup(() => { |
| if (document.fullscreenElement) { |
| return document.exitFullscreen(); |
| } |
| }); |
| await trusted_click(); |
| await Promise.all([document.documentElement.requestFullscreen(), fullScreenChange()]); |
| assert_equals(document.fullscreenElement, document.documentElement); |
| assert_true(document.documentElement.getBoundingClientRect().width > 0); |
| }); |
| </script> |