<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<img id="our_image" src="resources/blue_rect.jpg">
<script>
var jsTestIsAsync = true;
var img;
onload = function() {
img = document.getElementById("our_image");
shouldNotBe('img.currentSrc.indexOf("blue_rect.jpg")', '-1');
img.onload = function() {
shouldNotBe('img.currentSrc.indexOf("image-set-4x")', '-1');
finishJSTest();
}
img.srcset = "resources/image-set-4x.png 120w";
img.onerror = function() {
testFailed('Image should have loaded');
};
}
</script>