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

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

Issue 1183233002: Split RW hint into Width and Viewport-Width (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed and added layout tests 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/misc/client-hints-dynamic-rw-sizes.html
diff --git a/LayoutTests/http/tests/misc/client-hints-dynamic-rw-sizes.html b/LayoutTests/http/tests/misc/client-hints-dynamic-rw-sizes.html
index 8e01f8ea2c41ea438c440598574bf142af732e9e..53c1de91dae2a2734b7e05e9a465628c0b2a7145 100644
--- a/LayoutTests/http/tests/misc/client-hints-dynamic-rw-sizes.html
+++ b/LayoutTests/http/tests/misc/client-hints-dynamic-rw-sizes.html
@@ -1,16 +1,18 @@
<!DOCTYPE html>
-<meta http-equiv="Accept-CH" content="DPR, RW">
+<meta http-equiv="Accept-CH" content="DPR, Width, Viewport-Width">
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
- document.write('<img id="testimg1" src="resources/image-checks-for-rw.php?rw=480" sizes="60vw">');
- document.write('<img id="testimg2" sizes="40vw" src="resources/image-checks-for-rw.php?rw=320" sizes="60vw">');
- document.write('<img id="testimg3" sizes="50vw" src="resources/image-checks-for-rw.php?rw=400">');
+ document.write('<img id="testimg1" src="resources/image-checks-for-width.php?rw=480" sizes="60vw">');
+ document.write('<img id="testimg2" sizes="40vw" src="resources/image-checks-for-width.php?rw=320" sizes="60vw">');
+ document.write('<img id="testimg3" sizes="50vw" src="resources/image-checks-for-width.php?rw=400">');
+ document.write('<img id="testimg4" sizes="50vw" src="resources/image-checks-for-viewport-width.php?viewport=800">');
var t = async_test('Client-Hints sent with the right RW value when Accept-CH header is present');
window.onload = t.step_func(function() {
assert_not_equals(document.getElementById("testimg1").naturalWidth, 0);
assert_not_equals(document.getElementById("testimg2").naturalWidth, 0);
assert_not_equals(document.getElementById("testimg3").naturalWidth, 0);
+ assert_not_equals(document.getElementById("testimg4").naturalWidth, 0);
t.done();
});
</script>

Powered by Google App Engine
This is Rietveld 408576698