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

Unified Diff: LayoutTests/fast/hidpi/image-srcset-data-srcset.html

Issue 674923004: Avoid srcset resource download when higher density resource is in cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed layout tests and added some. Created 6 years, 2 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/hidpi/image-srcset-data-srcset.html
diff --git a/LayoutTests/fast/hidpi/image-srcset-data-srcset.html b/LayoutTests/fast/hidpi/image-srcset-data-srcset.html
index 1e3ec2a530fc43d3d685c73063a38f936d76713f..2c7f9343256e005031db26aeeac3caf5f1e61a01 100644
--- a/LayoutTests/fast/hidpi/image-srcset-data-srcset.html
+++ b/LayoutTests/fast/hidpi/image-srcset-data-srcset.html
@@ -3,12 +3,13 @@
<script src="../../resources/js-test.js"></script>
<script>
addEventListener("load", function() {
- shouldBeTrue('document.getElementById("foo").clientWidth==150');
+ shouldBeTrue('document.getElementById("foo").clientWidth==75');
}, false);
</script>
</head>
<body id="body">
<div>This test passes if the image below looks like a 2x2 grid (yellow, gray, light green, dark green). In this case the srcset attribute has a base64 url, with the comma escaped.</div>
+ <div>The image is displayed in a width of 75px, since the 2x resource gets picked (as the highest density resource current available.</div>
<img id="foo" src=""
srcset="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAA8CAIAAAAL5NQ9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2woaBQc4oLEFpAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAACMSURBVHja7dNBEYAgFEVRPhHMYgAzUIsmVnFvB/fsoQb+ObfBmzMvxneW1D1vzz2wFiEUQiFEKIRCKIQIhVAIhRChEAqhECIUQiEUQoRCKIRCiFAIhVAIEep3xTWTLzzu5oVCKIRCiFAIhVAIEQqhEAohQiEUQiFEKIRCKIQIhVAIhRChEAqhECLUZi3VEwcBMGr1NgAAAABJRU5ErkJggg== 2x,
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAA8CAIAAAAL5NQ9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2woaBQc4oLEFpAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAACMSURBVHja7dNBEYAgFEVRPhHMYgAzUIsmVnFvB/fsoQb+ObfBmzMvxneW1D1vzz2wFiEUQiFEKIRCKIQIhVAIhRChEAqhECIUQiEUQoRCKIRCiFAIhVAIEep3xTWTLzzu5oVCKIRCiFAIhVAIEQqhEAohQiEUQiFEKIRCKIQIhVAIhRChEAqhECLUZi3VEwcBMGr1NgAAAABJRU5ErkJggg== 1x">

Powered by Google App Engine
This is Rietveld 408576698