Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: LayoutTests/fast/loader/data-images-with-images-disabled.html

Issue 16922002: Do not load deferred/disabled data uri images. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698