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

Side by Side 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, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>HTTP Cache - 304 Updates</title>
6 <meta name="help" href="https://fetch.spec.whatwg.org/#request">
7 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script>
9 <script src="/common/utils.js"></script>
10 <script src="/common/get-host-info.sub.js"></script>
11 <script src="http-cache.js"></script>
12 </head>
13 <body>
14 <script>
15 var tests = [
16 {
17 name: 'HTTP cache updates returned headers from a Last-Modified 304.',
18 requests: [
19 {
20 response_headers: [
21 ["Expires", http_date(-5000)],
22 ["Last-Modified", http_date(-3000)],
23 ["Test-Header", "A"]
24 ]
25 },
26 {
27 response_headers: [
28 ["Expires", http_date(-3000)],
29 ["Last-Modified", http_date(-3000)],
30 ["Test-Header", "B"]
31 ],
32 expected_type: "lm_validated",
33 expected_response_headers: [
34 ["Test-Header", "B"]
35 ]
36 }
37 ]
38 },
39 {
40 name: 'HTTP cache updates stored headers from a Last-Modified 304.',
41 requests: [
42 {
43 response_headers: [
44 ["Expires", http_date(-5000)],
45 ["Last-Modified", http_date(-3000)],
46 ["Test-Header", "A"]
47 ]
48 },
49 {
50 response_headers: [
51 ["Expires", http_date(3000)],
52 ["Last-Modified", http_date(-3000)],
53 ["Test-Header", "B"]
54 ],
55 expected_type: "lm_validated",
56 expected_response_headers: [
57 ["Test-Header", "B"]
58 ]
59 },
60 {
61 expected_type: "cached",
62 expected_response_headers: [
63 ["Test-Header", "B"]
64 ]
65 }
66 ]
67 },
68 {
69 name: 'HTTP cache updates returned headers from a ETag 304.',
70 requests: [
71 {
72 response_headers: [
73 ["Expires", http_date(-5000)],
74 ["ETag", "ABC"],
75 ["Test-Header", "A"]
76 ]
77 },
78 {
79 response_headers: [
80 ["Expires", http_date(-3000)],
81 ["ETag", "ABC"],
82 ["Test-Header", "B"]
83 ],
84 expected_type: "etag_validated",
85 expected_response_headers: [
86 ["Test-Header", "B"]
87 ]
88 }
89 ]
90 },
91 {
92 name: 'HTTP cache updates stored headers from a ETag 304.',
93 requests: [
94 {
95 response_headers: [
96 ["Expires", http_date(-5000)],
97 ["ETag", "DEF"],
98 ["Test-Header", "A"]
99 ]
100 },
101 {
102 response_headers: [
103 ["Expires", http_date(3000)],
104 ["ETag", "DEF"],
105 ["Test-Header", "B"]
106 ],
107 expected_type: "etag_validated",
108 expected_response_headers: [
109 ["Test-Header", "B"]
110 ]
111 },
112 {
113 expected_type: "cached",
114 expected_response_headers: [
115 ["Test-Header", "B"]
116 ]
117 }
118 ]
119 },
120 ];
121 run_tests(tests);
122 </script>
123 </body>
124 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698