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

Unified Diff: LayoutTests/http/tests/resources/dpr.php

Issue 46313002: Support the DPR header for client hints. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: with cache tests Created 7 years, 2 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/resources/dpr.php
diff --git a/LayoutTests/http/tests/resources/dpr.php b/LayoutTests/http/tests/resources/dpr.php
new file mode 100644
index 0000000000000000000000000000000000000000..821c3dcced909d65bcf832b5d3273334a9706030
--- /dev/null
+++ b/LayoutTests/http/tests/resources/dpr.php
@@ -0,0 +1,21 @@
+<?php
+$name = $_GET['name'];
+$mimeType = $_GET['mimeType'];
+$dpr = $_GET['dpr'];
+
+header('Content-Type: ' . $mimeType);
+header('Content-Length: ' . filesize($name));
+if (isset($_GET['expires']))
+ header('Cache-control: max-age=0');
+else
+ header('Cache-control: max-age=86400');
+header('ETag: dprimage');
+
+if ($_SERVER['HTTP_IF_NONE_MATCH'] == 'dprimage') {
+ header('HTTP/1.1 304 Not Modified');
+ exit;
+}
+
+header('DPR: '. $dpr);
+
+readfile($name);
« no previous file with comments | « LayoutTests/http/tests/images/image-with-dpr-header-expected.html ('k') | Source/core/fetch/ImageResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698