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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/misc/client-hints-accept.php

Issue 2860093003: Implement device-ram client hints header (Closed)
Patch Set: Rebase UseCounter.h Created 3 years, 7 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: 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..9e51aa4045593f5d3da1868f9566988aa26b83da 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");
?>
<!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);
};

Powered by Google App Engine
This is Rietveld 408576698