Index: LayoutTests/fast/loader/data-images-with-images-disabled.html |
diff --git a/LayoutTests/fast/loader/data-images-with-images-disabled.html b/LayoutTests/fast/loader/data-images-with-images-disabled.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0bf93db5741c23448ef50e30428e5818f3abd744 |
--- /dev/null |
+++ b/LayoutTests/fast/loader/data-images-with-images-disabled.html |
@@ -0,0 +1,28 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script> |
+function runTest() { |
+ if (window.testRunner && !testRunner.globalFlag) { |
+ // Setting ImagesAllowed is async. Reload to ensure it has been propagated to loaders. |
+ testRunner.dumpAsText(); |
+ testRunner.setImagesAllowed(false); |
+ testRunner.globalFlag = 1; |
+ testRunner.queueReload(); |
+ return; |
+ } |
+ |
+ var image = document.getElementsByTagName('img')[0]; |
+ if (image.naturalHeight != 0 || image.naturalWidth != 0) |
+ document.write('FAIL: images should not be loaded when images are disabled'); |
+ else |
+ document.write('PASS'); |
+} |
+</script> |
+</head> |
+<body onload="runTest()"> |
+ Test for crbug.com/249013: data uri images should not load when images are disabled.<br/> |
+ FAIL |
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAAnklEQVR42u3QMQEAAAgDILV/51nBzwci0CmuRoEsWbJkyZKlQJYsWbJkyVIgS5YsWbJkKZAlS5YsWbIUyJIlS5YsWQpkyZIlS5YsBbJkyZIlS5YCWbJkyZIlS4EsWbJkyZKlQJYsWbJkyVIgS5YsWbJkKZAlS5YsWbIUyJIlS5YsWQpkyZIlS5YsBbJkyZIlS5YCWbJkyZIlS4EsWd8Wil4Bx2r6t7cAAAAASUVORK5CYII="> |
+</body> |
+</html> |