<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
    if (window.testRunner) {
        testRunner.dumpAsText();
    }

    addEventListener("load", function() {
        shouldBeTrue('document.getElementById("foo").clientWidth==50');
    }, false);
</script>
</head>
<body id="body">
    <div>This test passes if the image below is not empty. It ensures that the srcset attribute support data URI schemes with escaped characters.</div>
    <img id="foo" src="" srcset="data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='100'><linearGradient%20id='gradient'><stop%20offset='10%'%20stop-color='%23F00'/><stop%20offset='90%'%20stop-color='%23fcc'/></linearGradient><rect%20fill='url(%23gradient)'%20x='0'%20y='0'%20width='100%'%20height='100%'/></svg> 2x">
</body>
</html>
