chromium/third_party/blink/web_tests/wpt_internal/infrastructure/printing-set-size-ref.html

<!DOCTYPE html>
<script>
    if (window.testRunner) {
        testRunner.setPrinting();
        testRunner.setPrintingSize(432, 288);
    }
</script>
<style>
    body {
        margin: 0pt;
    }
    div {
        width: 100vw;
        height: 100vh;
        background-color: green;
        -webkit-print-color-adjust: exact;
    }
</style>
<div></div>