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

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

Issue 1186333004: Add support for `width` based Width Client Hint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moar comments Created 5 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 <meta http-equiv="Accept-CH" content="DPR, Width, Viewport-Width"> 2 <meta http-equiv="Accept-CH" content="DPR, Width, Viewport-Width">
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> 5 <script src="../resources/slow-script.pl?delay=300"></script>
6 <img id="testimg1" src="resources/image-checks-for-width.php?rw=480" sizes="60vw "> 6 <img id="testimg1" src="resources/image-checks-for-width.php?rw=480" sizes="60vw ">
7 <img id="testimg2" sizes="40vw" src="resources/image-checks-for-width.php?rw=320 " sizes="60vw"> 7 <img id="testimg2" width="320" src="resources/image-checks-for-width.php?rw=320" >
8 <img id="testimg3" sizes="50vw" src="resources/image-checks-for-width.php?rw=400 "> 8 <img id="testimg3" width="400invalid" src="resources/image-checks-for-width.php? rw=400">
9 <img id="testimg4" sizes="50vw" src="resources/image-checks-for-viewport-width.p hp?viewport=800"> 9 <img id="testimg4" width="400%" src="resources/image-checks-for-width.php?cache_ bust=1">
10 <img id="testimg5" width="400%" width="400" src="resources/image-checks-for-widt h.php?cache_bust=2">
11 <img id="testimg6" width="400*" src="resources/image-checks-for-width.php?cache_ bust=3">
10 <script> 12 <script>
11 var t = async_test('Client-Hints sent with the right Width value Accept-CH h eader is present'); 13 var t = async_test('Client-Hints sent with the right Width value Accept-CH h eader is present');
12 window.onload = t.step_func(function() { 14 window.onload = t.step_func(function() {
13 assert_not_equals(document.getElementById("testimg1").naturalWidth, 0); 15 assert_not_equals(document.getElementById("testimg1").naturalWidth, 0);
14 assert_not_equals(document.getElementById("testimg2").naturalWidth, 0); 16 assert_not_equals(document.getElementById("testimg2").naturalWidth, 0);
15 assert_not_equals(document.getElementById("testimg3").naturalWidth, 0); 17 assert_not_equals(document.getElementById("testimg3").naturalWidth, 0);
16 assert_not_equals(document.getElementById("testimg4").naturalWidth, 0); 18 assert_equals(document.getElementById("testimg4").naturalWidth, 0);
19 assert_equals(document.getElementById("testimg5").naturalWidth, 0);
20 assert_equals(document.getElementById("testimg6").naturalWidth, 0);
17 t.done(); 21 t.done();
18 }); 22 });
19 </script> 23 </script>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/misc/client-hints-accept-meta-preloader.html ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698