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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/script-with-constant-last-modified.php

Issue 2413233003: DevTools: introduce WI.Resource.contentSize() and WI.Resource.lastModified() (Closed)
Patch Set: always send last-modified in php script Created 4 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: third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/script-with-constant-last-modified.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/resources/random-cached.php b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/script-with-constant-last-modified.php
similarity index 56%
copy from third_party/WebKit/LayoutTests/http/tests/inspector/network/resources/random-cached.php
copy to third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/script-with-constant-last-modified.php
index 6b095ae94dbbbc703e15460de696d408dce16ea2..dbb2d28c6b12667c0f3ad822e4d2352ad1707fc7 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/network/resources/random-cached.php
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/script-with-constant-last-modified.php
@@ -1,18 +1,14 @@
<?php
- if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
- header("HTTP/1.0 304 Not Modified");
- exit;
- }
-
$max_age = 12 * 31 * 24 * 60 * 60; //one year
$expires = gmdate(DATE_RFC1123, time() + $max_age);
- $last_modified = gmdate(DATE_RFC1123, time() - $max_age);
+ // Dec 01, 1989, 8:00:00AM.
+ $last_modified = gmdate(DATE_RFC1123, 628502400);
header("Cache-Control: public, max-age=" . 5*$max_age);
header("Cache-control: max-age=0");
header("Expires: " . $expires);
- header("Content-Type: text/html");
+ header("Content-Type: text/javascript");
header("Last-Modified: " . $last_modified);
- echo(rand());
+ echo("console.log(\"Done.\");");
?>

Powered by Google App Engine
This is Rietveld 408576698