Index: LayoutTests/http/tests/loading/dont-preload-non-img-srcset.html |
diff --git a/LayoutTests/http/tests/loading/dont-preload-non-img-srcset.html b/LayoutTests/http/tests/loading/dont-preload-non-img-srcset.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bc3a652f74430fd8a2650dd0d498db9f32dca167 |
--- /dev/null |
+++ b/LayoutTests/http/tests/loading/dont-preload-non-img-srcset.html |
@@ -0,0 +1,22 @@ |
+<html> |
+<head> |
+<script src="../resources/js-test-pre.js"></script> |
+<script> |
+ window.targetScaleFactor = 1; |
+</script> |
+<script src="../resources/srcset-helper.js"></script> |
+<script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=1000"></script> |
+</head> |
+<body> |
+<script> |
+ shouldBeTrue("internals.isPreloaded('resources/base-image1.png');"); |
+ shouldBeFalse("internals.isPreloaded('resources/empty.html');"); |
+ shouldBeFalse("internals.isPreloaded('resources/empty.js');"); |
+</script> |
+<div>This test passes if the image is preloaded, but none of the non-img elements with a srcset attribute is.</div> |
+<img height="100" width="100" src="resources/preload-test.jpg" srcset="resources/base-image1.png 1x, resources/base-image3.png 3x, resources/base-image2.png 2x"></img> |
+<iframe srcset="resources/empty.html"></iframe> |
+<script srcset="resources/empty.js"></script> |
+</body> |
+</html> |
+ |