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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/fetch/http-cache/304-update.html

Issue 2778753002: Import //fetch from Web Platform Tests. (Closed)
Patch Set: Baselines. Created 3 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: third_party/WebKit/LayoutTests/external/wpt/fetch/http-cache/304-update.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/http-cache/304-update.html b/third_party/WebKit/LayoutTests/external/wpt/fetch/http-cache/304-update.html
new file mode 100644
index 0000000000000000000000000000000000000000..663191a8785721ab9762c1285fb0fe0cfc4845ac
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/http-cache/304-update.html
@@ -0,0 +1,124 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>HTTP Cache - 304 Updates</title>
+ <meta name="help" href="https://fetch.spec.whatwg.org/#request">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/common/utils.js"></script>
+ <script src="/common/get-host-info.sub.js"></script>
+ <script src="http-cache.js"></script>
+ </head>
+ <body>
+ <script>
+ var tests = [
+ {
+ name: 'HTTP cache updates returned headers from a Last-Modified 304.',
+ requests: [
+ {
+ response_headers: [
+ ["Expires", http_date(-5000)],
+ ["Last-Modified", http_date(-3000)],
+ ["Test-Header", "A"]
+ ]
+ },
+ {
+ response_headers: [
+ ["Expires", http_date(-3000)],
+ ["Last-Modified", http_date(-3000)],
+ ["Test-Header", "B"]
+ ],
+ expected_type: "lm_validated",
+ expected_response_headers: [
+ ["Test-Header", "B"]
+ ]
+ }
+ ]
+ },
+ {
+ name: 'HTTP cache updates stored headers from a Last-Modified 304.',
+ requests: [
+ {
+ response_headers: [
+ ["Expires", http_date(-5000)],
+ ["Last-Modified", http_date(-3000)],
+ ["Test-Header", "A"]
+ ]
+ },
+ {
+ response_headers: [
+ ["Expires", http_date(3000)],
+ ["Last-Modified", http_date(-3000)],
+ ["Test-Header", "B"]
+ ],
+ expected_type: "lm_validated",
+ expected_response_headers: [
+ ["Test-Header", "B"]
+ ]
+ },
+ {
+ expected_type: "cached",
+ expected_response_headers: [
+ ["Test-Header", "B"]
+ ]
+ }
+ ]
+ },
+ {
+ name: 'HTTP cache updates returned headers from a ETag 304.',
+ requests: [
+ {
+ response_headers: [
+ ["Expires", http_date(-5000)],
+ ["ETag", "ABC"],
+ ["Test-Header", "A"]
+ ]
+ },
+ {
+ response_headers: [
+ ["Expires", http_date(-3000)],
+ ["ETag", "ABC"],
+ ["Test-Header", "B"]
+ ],
+ expected_type: "etag_validated",
+ expected_response_headers: [
+ ["Test-Header", "B"]
+ ]
+ }
+ ]
+ },
+ {
+ name: 'HTTP cache updates stored headers from a ETag 304.',
+ requests: [
+ {
+ response_headers: [
+ ["Expires", http_date(-5000)],
+ ["ETag", "DEF"],
+ ["Test-Header", "A"]
+ ]
+ },
+ {
+ response_headers: [
+ ["Expires", http_date(3000)],
+ ["ETag", "DEF"],
+ ["Test-Header", "B"]
+ ],
+ expected_type: "etag_validated",
+ expected_response_headers: [
+ ["Test-Header", "B"]
+ ]
+ },
+ {
+ expected_type: "cached",
+ expected_response_headers: [
+ ["Test-Header", "B"]
+ ]
+ }
+ ]
+ },
+ ];
+ run_tests(tests);
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698