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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/hidpi/image-srcset-intrinsic-size-zero.html

Issue 2085153002: Adjust test expectations for infinite-size images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small refactor Created 4 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script> 2 <script>
3 window.targetScaleFactor = 2; 3 window.targetScaleFactor = 2;
4 </script> 4 </script>
5 <script src="resources/srcset-helper.js"></script> 5 <script src="resources/srcset-helper.js"></script>
6 <script src="../../resources/js-test.js"></script> 6 <script src="../../resources/js-test.js"></script>
7 <script> 7 <script>
8 var imgWidth; 8 var imgWidth;
9 addEventListener("load", function() { 9 addEventListener("load", function() {
10 imgWidth = document.getElementById("foo").clientWidth; 10 imgWidth = document.getElementById("foo").clientWidth;
11 shouldBe('imgWidth', '33554431' /* blink::intMaxForLayoutUnit */); 11 var expected = 33554431; // blink::intMaxForLayoutUnit
12 if (sessionStorage.useZoomForDsfEnabled === 'true')
13 expected = Math.round(expected / window.devicePixelRatio);
14 shouldBe('imgWidth', '' + expected);
12 }, false); 15 }, false);
13 </script> 16 </script>
14 <div> 17 <div>
15 This test passes if the image is displayed with infinite dimensions. 18 This test passes if the image is displayed with infinite dimensions.
16 </div> 19 </div>
17 <img id="foo" srcset="resources/blue-100-px-square.png 0x"> 20 <img id="foo" srcset="resources/blue-100-px-square.png 0x">
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698