Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php b/third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php |
| index 72f78b09b45224b02d7bbaca669823511d8703bb..2e3ed610c8e51be62cbe984df7041e908d09dbdf 100644 |
| --- a/third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php |
| +++ b/third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php |
| @@ -1,5 +1,5 @@ |
| <?php |
| - header("ACCEPT-CH: DPR, Width, Viewport-Width"); |
| + header("ACCEPT-CH: DPR, Width, Viewport-Width, Device-Ram"); |
|
Yoav Weiss
2017/05/24 07:48:02
Nit: Maybe "Device-RAM"? (I don't think it makes a
fmeawad
2017/05/24 18:24:56
Done.
|
| ?> |
| <!DOCTYPE html> |
| <script src="../resources/testharness.js"></script> |
| @@ -11,11 +11,18 @@ |
| assert_unreached("Image should have loaded."); |
| }; |
| + var loadDeviceRamImage = function() { |
| + var img = new Image(); |
| + img.src = 'resources/image-checks-for-device-ram.php'; |
| + img.onload = t.step_func(function(){ t.done(); }); |
| + img.onerror = t.step_func(unreached); |
| + document.body.appendChild(img); |
| + }; |
| var loadRWImage = function() { |
| var img = new Image(); |
| img.src = 'resources/image-checks-for-width.php'; |
| img.sizes = '500'; |
| - img.onload = t.step_func(function(){ t.done(); }); |
| + img.onload = t.step_func(loadDeviceRamImage); |
| img.onerror = t.step_func(unreached); |
| document.body.appendChild(img); |
| }; |