Index: LayoutTests/fast/dom/HTMLImageElement/image-src-added-srcset-w-descriptors.html |
diff --git a/LayoutTests/fast/dom/HTMLImageElement/image-src-added-srcset-w-descriptors.html b/LayoutTests/fast/dom/HTMLImageElement/image-src-added-srcset-w-descriptors.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..467449b235bcdabf9ec6c990a6bf379fa23cf635 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/HTMLImageElement/image-src-added-srcset-w-descriptors.html |
@@ -0,0 +1,22 @@ |
+<!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> |