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

Unified Diff: LayoutTests/http/tests/appcache/resources/modified-manifest.php

Issue 217133002: AppCache error details tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: statusCode -> status Created 6 years, 9 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/appcache/resources/modified-manifest.php
diff --git a/LayoutTests/http/tests/appcache/resources/versioned-manifest.php b/LayoutTests/http/tests/appcache/resources/modified-manifest.php
similarity index 66%
copy from LayoutTests/http/tests/appcache/resources/versioned-manifest.php
copy to LayoutTests/http/tests/appcache/resources/modified-manifest.php
index 84a7a91265fb6d16a57669bc0b895b698a5894b2..ca4a03aed55ff98961465812b3cfb0a1e9849aab 100644
--- a/LayoutTests/http/tests/appcache/resources/versioned-manifest.php
+++ b/LayoutTests/http/tests/appcache/resources/modified-manifest.php
@@ -1,7 +1,11 @@
<?php
require_once '../../resources/portabilityLayer.php';
-$tmpFile = sys_get_temp_dir() . "/" . "appcache_manifest_counter";
+# This manifest references itself with a command to bump a counter, so
+# that a subsequent fetch of the same manifest URL returns a file that
+# is not byte-for-byte identical, which will cause caching to fail.
+
+$tmpFile = sys_get_temp_dir() . "/" . "appcache_modified_manifest_counter";
function getCount($file)
{
@@ -20,18 +24,16 @@ function stepCounter($file)
}
}
+if ("step" == $_GET['command'])
+ stepCounter($tmpFile);
+
header("Expires: Thu, 01 Dec 2003 16:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: text/cache-manifest");
-if ("step" == $_GET['command'])
- stepCounter($tmpFile);
-
print("CACHE MANIFEST\n");
print("# version " . getCount($tmpFile) . "\n");
-print("counter.php\n");
-print("uncacheable-resource.php\n"); // with Cache-control: no-store
-print("NETWORK:\n");
-print("versioned-manifest.php?command=\n");
+print("CACHE:\n");
+print("modified-manifest.php?command=step\n");
?>

Powered by Google App Engine
This is Rietveld 408576698