chromium/third_party/blink/web_tests/virtual/overlay-scrollbar/root-client-size.html

<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
    :root { width: 100%; height: 100% }
    #container.wide { width: 5000px; height: 10px; }
    #container.tall { height: 5000px; width: 10px; }
</style>
<div id="container"></div>
<script>
    description("Style recalc when reading clientWidth/clientHeight of documentElement in strict mode.");

    shouldBeDefined(window.internals);
    shouldBeTrue("internals.overlayScrollbarsEnabled");

    function runClientSizeTest(testClass) {

        var origWidth = document.documentElement.clientWidth;
        var origHeight = document.documentElement.clientHeight;
        internals.updateStyleAndReturnAffectedElementCount();

        container.classList.add(testClass)

        var afterWidth = document.documentElement.clientWidth;
        var afterHeight = document.documentElement.clientHeight;

        shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
        shouldBe(""+origWidth, ""+afterWidth);
        shouldBe(""+origHeight, ""+afterHeight);

        container.classList.remove(testClass)
    }

    runClientSizeTest("wide");
    runClientSizeTest("tall");
</script>