chromium/third_party/blink/web_tests/http/tests/misc/client-hints-preload-rw-sizes.html

<!DOCTYPE html>
<meta http-equiv="Accept-CH" content="DPR, Width, Viewport-Width">
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../resources/slow-script.pl?delay=300"></script>
<img id="testimg1" src="resources/image-checks-for-width.php?rw=480" sizes="60vw">
<img id="testimg2" sizes="40vw" src="resources/image-checks-for-width.php?rw=320" sizes="60vw">
<img id="testimg3" sizes="50vw" src="resources/image-checks-for-width.php?rw=400">
<img id="testimg4" sizes="50vw" src="resources/image-checks-for-viewport-width.php?viewport=800">
<script>
    var t = async_test('Client-Hints sent with the right Width value Accept-CH header is present');
    window.onload = t.step_func(function() {
        assert_not_equals(document.getElementById("testimg1").naturalWidth, 0);
        assert_not_equals(document.getElementById("testimg2").naturalWidth, 0);
        assert_not_equals(document.getElementById("testimg3").naturalWidth, 0);
        assert_not_equals(document.getElementById("testimg4").naturalWidth, 0);
        t.done();
    });
</script>