fullscreen-root-block-size.html (1037B)
1 <!DOCTYPE html> 2 <style> 3 html, 4 body { 5 margin: 0px; 6 } 7 </style> 8 <title>fullscreen root block sizing</title> 9 <!-- This page intentionally has no content. It needs to have 10 no width or height. This is to ensure that the root element 11 gets sizing in fullscreen mode as it does in as it does not 12 in fullscreen mode. 13 --> 14 <script src="/resources/testharness.js"></script> 15 <script src="/resources/testharnessreport.js"></script> 16 <script src="/resources/testdriver.js"></script> 17 <script src="/resources/testdriver-vendor.js"></script> 18 <script src="../trusted-click.js"></script> 19 <body></body> 20 <script> 21 promise_test(async (t) => { 22 t.add_cleanup(() => { 23 if (document.fullscreenElement) { 24 return document.exitFullscreen(); 25 } 26 }); 27 await trusted_click(); 28 await Promise.all([document.documentElement.requestFullscreen(), fullScreenChange()]); 29 assert_equals(document.fullscreenElement, document.documentElement); 30 assert_true(document.documentElement.getBoundingClientRect().width > 0); 31 }); 32 </script>