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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/misc/resources/image-checks-for-device-ram.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/resources/image-checks-for-device-ram.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/resources/image-checks-for-device-ram.php b/third_party/WebKit/LayoutTests/http/tests/misc/resources/image-checks-for-device-ram.php
new file mode 100644
index 0000000000000000000000000000000000000000..3a4b0d1dad01a14b5024e2cd6da41855fc437cfc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/misc/resources/image-checks-for-device-ram.php
@@ -0,0 +1,12 @@
+<?php
+ $device_ram = $_SERVER["HTTP_DEVICE_RAM"];
+
+ if(isset($device_ram) && $device_ram != 0
+ && ($device_ram & ($device_ram - 1)) == 0) {
+ $fn = fopen("compass.jpg", "r");
+ fpassthru($fn);
+ fclose($fn);
+ exit;
+ }
+ header("HTTP/1.1 417 Expectation failed");
+?>

Powered by Google App Engine
This is Rietveld 408576698