chromium/third_party/blink/web_tests/fast/dom/script-styled-size.html

<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>

<style>
    script { display: block; }
</style>

<script>
description("Test that script can access its own renderer when executing");

document.documentElement.offsetTop;
script = document.createElement('script');
script.textContent = 'shouldBeTrue("script.offsetWidth > 0")';
document.documentElement.appendChild(script);
shouldBeTrue('script.offsetWidth > 0');
</script>