chromium/third_party/blink/web_tests/fast/hidpi/image-srcset-intrinsic-size.html

<!DOCTYPE html>
<script>
    window.targetScaleFactor = 2;
</script>
<script src="resources/srcset-helper.js"></script>
<script src="../../resources/js-test.js"></script>
<script>
    addEventListener("load", function() {
        shouldBe('document.getElementById("foo").clientWidth', '200');
        shouldBe('document.getElementById("foo2").clientWidth', '400');
        shouldBe('document.getElementById("foo3").clientWidth', '100');
        shouldBe('document.getElementById("foo4").clientWidth', '200');
        shouldBe('document.getElementById("foo5").clientWidth', '200');
    }, false);
</script>
<div>
    This test passes if the images are all displayed with appropriate dimensions.
</div>
<img id="foo" srcset="resources/blue-100-px-square.png 1x, resources/deleteButton.png 3x, resources/green-400-px-square.png 2x">
<br>
<img id="foo2" src="resources/green-400-px-square.png">
<br>
<img id="foo3" srcset="resources/srcset.svg 2x">
<br>
<img id="foo4" srcset="resources/blue-100-px-square.png 0.5x">
<br>
<img id="foo5" src="resources/srcset.svg">