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

Unified Diff: LayoutTests/fast/dom/HTMLImageElement/image-srcset-react-to-media-changes-when-viewport-downsized.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/dom/HTMLImageElement/image-srcset-react-to-media-changes-when-viewport-downsized.html
diff --git a/LayoutTests/fast/dom/HTMLImageElement/image-srcset-react-to-media-changes.html b/LayoutTests/fast/dom/HTMLImageElement/image-srcset-react-to-media-changes-when-viewport-downsized.html
similarity index 76%
copy from LayoutTests/fast/dom/HTMLImageElement/image-srcset-react-to-media-changes.html
copy to LayoutTests/fast/dom/HTMLImageElement/image-srcset-react-to-media-changes-when-viewport-downsized.html
index 6b5057f6f9f27183038c5ab0ba892edbd36f8792..382692c59880bf5eb7513744a79342d486b5f837 100644
--- a/LayoutTests/fast/dom/HTMLImageElement/image-srcset-react-to-media-changes.html
+++ b/LayoutTests/fast/dom/HTMLImageElement/image-srcset-react-to-media-changes-when-viewport-downsized.html
@@ -16,11 +16,11 @@ onload = function() {
img.onload = function() {
if (first) {
first = false;
- shouldNotBe('img.currentSrc.indexOf("blue_rect")', '-1');
- iframe.style.width = '120px';
- } else {
shouldNotBe('img.currentSrc.indexOf("image-set-4x")', '-1');
- finishJSTest();
+ iframe.style.width = '90px';
+ setTimeout(function() { finishJSTest(); }, 200);
+ } else {
+ testFailed('onload should not fire a second time');
}
};
img.onerror = function() {
@@ -29,4 +29,4 @@ onload = function() {
}
</script>
-<iframe id="frame" style="width: 80px;"></iframe>
+<iframe id="frame" style="width: 120px;"></iframe>

Powered by Google App Engine
This is Rietveld 408576698