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

Side by Side Diff: LayoutTests/http/tests/misc/client-hints-dynamic-rw-sizes.html

Issue 1060483003: Add ImageLoader support for sizes based Client-Hints RW values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test failures Created 5 years, 8 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
« no previous file with comments | « no previous file | Source/core/html/HTMLImageElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta http-equiv="Accept-CH" content="DPR, RW"> 2 <meta http-equiv="Accept-CH" content="DPR, RW">
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="../resources/slow-script.pl?delay=300"></script>
6 <img id="testimg1" src="resources/image-checks-for-rw.php?rw=480" sizes="60vw">
7 <img id="testimg2" sizes="40vw" src="resources/image-checks-for-rw.php?rw=320" s izes="60vw">
8 <img id="testimg3" sizes="50vw" src="resources/image-checks-for-rw.php?rw=400">
9 <script> 5 <script>
10 var t = async_test('Client-Hints sent with the right RW value Accept-CH head er is present'); 6 document.write('<img id="testimg1" src="resources/image-checks-for-rw.php?rw =480" sizes="60vw">');
7 document.write('<img id="testimg2" sizes="40vw" src="resources/image-checks- for-rw.php?rw=320" sizes="60vw">');
8 document.write('<img id="testimg3" sizes="50vw" src="resources/image-checks- for-rw.php?rw=400">');
9 var t = async_test('Client-Hints sent with the right RW value when Accept-CH header is present');
11 window.onload = t.step_func(function() { 10 window.onload = t.step_func(function() {
12 assert_not_equals(document.getElementById("testimg1").naturalWidth, 0); 11 assert_not_equals(document.getElementById("testimg1").naturalWidth, 0);
13 assert_not_equals(document.getElementById("testimg2").naturalWidth, 0); 12 assert_not_equals(document.getElementById("testimg2").naturalWidth, 0);
14 assert_not_equals(document.getElementById("testimg3").naturalWidth, 0); 13 assert_not_equals(document.getElementById("testimg3").naturalWidth, 0);
15 t.done(); 14 t.done();
16 }); 15 });
17 </script> 16 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLImageElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698