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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/fetch/api/request/request-cache-default-conditional.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>Request cache - default with conditional requests</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="request-cache.js"></script>
12 </head>
13 <body>
14 <script>
15 var tests = [
16 {
17 name: 'RequestCache "default" mode with an If-Modified-Since header (fol lowing a request without additional headers) is treated similarly to "no-store"' ,
18 state: "stale",
19 request_cache: ["default", "default"],
20 request_headers: [{}, {"If-Modified-Since": now.toGMTString()}],
21 expected_validation_headers: [false, false],
22 expected_no_cache_headers: [false, true],
23 },
24 {
25 name: 'RequestCache "default" mode with an If-Modified-Since header (fol lowing a request without additional headers) is treated similarly to "no-store"' ,
26 state: "fresh",
27 request_cache: ["default", "default"],
28 request_headers: [{}, {"If-Modified-Since": now.toGMTString()}],
29 expected_validation_headers: [false, false],
30 expected_no_cache_headers: [false, true],
31 },
32 {
33 name: 'RequestCache "default" mode with an If-Modified-Since header is t reated similarly to "no-store"',
34 state: "stale",
35 request_cache: ["default", "default"],
36 request_headers: [{"If-Modified-Since": now.toGMTString()}, {}],
37 expected_validation_headers: [false, false],
38 expected_no_cache_headers: [true, false],
39 },
40 {
41 name: 'RequestCache "default" mode with an If-Modified-Since header is t reated similarly to "no-store"',
42 state: "fresh",
43 request_cache: ["default", "default"],
44 request_headers: [{"If-Modified-Since": now.toGMTString()}, {}],
45 expected_validation_headers: [false, false],
46 expected_no_cache_headers: [true, false],
47 },
48 {
49 name: 'RequestCache "default" mode with an If-None-Match header (followi ng a request without additional headers) is treated similarly to "no-store"',
50 state: "stale",
51 request_cache: ["default", "default"],
52 request_headers: [{}, {"If-None-Match": '"foo"'}],
53 expected_validation_headers: [false, false],
54 expected_no_cache_headers: [false, true],
55 },
56 {
57 name: 'RequestCache "default" mode with an If-None-Match header (followi ng a request without additional headers) is treated similarly to "no-store"',
58 state: "fresh",
59 request_cache: ["default", "default"],
60 request_headers: [{}, {"If-None-Match": '"foo"'}],
61 expected_validation_headers: [false, false],
62 expected_no_cache_headers: [false, true],
63 },
64 {
65 name: 'RequestCache "default" mode with an If-None-Match header is treat ed similarly to "no-store"',
66 state: "stale",
67 request_cache: ["default", "default"],
68 request_headers: [{"If-None-Match": '"foo"'}, {}],
69 expected_validation_headers: [false, false],
70 expected_no_cache_headers: [true, false],
71 },
72 {
73 name: 'RequestCache "default" mode with an If-None-Match header is treat ed similarly to "no-store"',
74 state: "fresh",
75 request_cache: ["default", "default"],
76 request_headers: [{"If-None-Match": '"foo"'}, {}],
77 expected_validation_headers: [false, false],
78 expected_no_cache_headers: [true, false],
79 },
80 {
81 name: 'RequestCache "default" mode with an If-Unmodified-Since header (f ollowing a request without additional headers) is treated similarly to "no-store "',
82 state: "stale",
83 request_cache: ["default", "default"],
84 request_headers: [{}, {"If-Unmodified-Since": now.toGMTString()}],
85 expected_validation_headers: [false, false],
86 expected_no_cache_headers: [false, true],
87 },
88 {
89 name: 'RequestCache "default" mode with an If-Unmodified-Since header (f ollowing a request without additional headers) is treated similarly to "no-store "',
90 state: "fresh",
91 request_cache: ["default", "default"],
92 request_headers: [{}, {"If-Unmodified-Since": now.toGMTString()}],
93 expected_validation_headers: [false, false],
94 expected_no_cache_headers: [false, true],
95 },
96 {
97 name: 'RequestCache "default" mode with an If-Unmodified-Since header is treated similarly to "no-store"',
98 state: "stale",
99 request_cache: ["default", "default"],
100 request_headers: [{"If-Unmodified-Since": now.toGMTString()}, {}],
101 expected_validation_headers: [false, false],
102 expected_no_cache_headers: [true, false],
103 },
104 {
105 name: 'RequestCache "default" mode with an If-Unmodified-Since header is treated similarly to "no-store"',
106 state: "fresh",
107 request_cache: ["default", "default"],
108 request_headers: [{"If-Unmodified-Since": now.toGMTString()}, {}],
109 expected_validation_headers: [false, false],
110 expected_no_cache_headers: [true, false],
111 },
112 {
113 name: 'RequestCache "default" mode with an If-Match header (following a request without additional headers) is treated similarly to "no-store"',
114 state: "stale",
115 request_cache: ["default", "default"],
116 request_headers: [{}, {"If-Match": '"foo"'}],
117 expected_validation_headers: [false, false],
118 expected_no_cache_headers: [false, true],
119 },
120 {
121 name: 'RequestCache "default" mode with an If-Match header (following a request without additional headers) is treated similarly to "no-store"',
122 state: "fresh",
123 request_cache: ["default", "default"],
124 request_headers: [{}, {"If-Match": '"foo"'}],
125 expected_validation_headers: [false, false],
126 expected_no_cache_headers: [false, true],
127 },
128 {
129 name: 'RequestCache "default" mode with an If-Match header is treated si milarly to "no-store"',
130 state: "stale",
131 request_cache: ["default", "default"],
132 request_headers: [{"If-Match": '"foo"'}, {}],
133 expected_validation_headers: [false, false],
134 expected_no_cache_headers: [true, false],
135 },
136 {
137 name: 'RequestCache "default" mode with an If-Match header is treated si milarly to "no-store"',
138 state: "fresh",
139 request_cache: ["default", "default"],
140 request_headers: [{"If-Match": '"foo"'}, {}],
141 expected_validation_headers: [false, false],
142 expected_no_cache_headers: [true, false],
143 },
144 {
145 name: 'RequestCache "default" mode with an If-Range header (following a request without additional headers) is treated similarly to "no-store"',
146 state: "stale",
147 request_cache: ["default", "default"],
148 request_headers: [{}, {"If-Range": '"foo"'}],
149 expected_validation_headers: [false, false],
150 expected_no_cache_headers: [false, true],
151 },
152 {
153 name: 'RequestCache "default" mode with an If-Range header (following a request without additional headers) is treated similarly to "no-store"',
154 state: "fresh",
155 request_cache: ["default", "default"],
156 request_headers: [{}, {"If-Range": '"foo"'}],
157 expected_validation_headers: [false, false],
158 expected_no_cache_headers: [false, true],
159 },
160 {
161 name: 'RequestCache "default" mode with an If-Range header is treated si milarly to "no-store"',
162 state: "stale",
163 request_cache: ["default", "default"],
164 request_headers: [{"If-Range": '"foo"'}, {}],
165 expected_validation_headers: [false, false],
166 expected_no_cache_headers: [true, false],
167 },
168 {
169 name: 'RequestCache "default" mode with an If-Range header is treated si milarly to "no-store"',
170 state: "fresh",
171 request_cache: ["default", "default"],
172 request_headers: [{"If-Range": '"foo"'}, {}],
173 expected_validation_headers: [false, false],
174 expected_no_cache_headers: [true, false],
175 },
176 ];
177 run_tests(tests);
178 </script>
179 </body>
180 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698