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> |