| <html> |
| <head> |
| <script src="resources/srcset-helper.js"></script> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| } |
| |
| addEventListener("load", function() { |
| shouldBeTrue('document.getElementById("foo").clientWidth==200'); |
| }, false); |
| </script> |
| </head> |
| |
| <body id="body"> |
| <div>This test passes if this img tag below is a green square regardless of the scale factor. It ensures that invalid inputs |
| from srcset are ignored, and src is selected (since it's the only candidate left)</div> |
| <img id="foo" src="resources/green-200-px-square.png" srcset="1x,, , , 2x ,,"> |
| </body> |
| </html> |