Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /fullscreen/rendering/fullscreen-root-block-size.html - WPT Dashboard Interop Dashboard
<!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 document.documentElement.requestFullscreen();
await fullScreenChange();
assert_equals(document.fullscreenElement, document.documentElement);
assert_true(document.documentElement.getBoundingClientRect().width > 0);
});
</script>