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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/fetch/api/request/request-cache-only-if-cached.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 - only-if-cached</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 "only-if-cached" mode checks the cache for previousl y cached content and avoids revalidation for stale responses',
18 state: "stale",
19 request_cache: ["default", "only-if-cached"],
20 expected_validation_headers: [false],
21 expected_no_cache_headers: [false]
22 },
23 {
24 name: 'RequestCache "only-if-cached" mode checks the cache for previousl y cached content and avoids revalidation for fresh responses',
25 state: "fresh",
26 request_cache: ["default", "only-if-cached"],
27 expected_validation_headers: [false],
28 expected_no_cache_headers: [false]
29 },
30 {
31 name: 'RequestCache "only-if-cached" mode checks the cache for previousl y cached content and does not go to the network if a cached response is not foun d',
32 state: "fresh",
33 request_cache: ["only-if-cached"],
34 response: ["error"],
35 expected_validation_headers: [],
36 expected_no_cache_headers: []
37 },
38 {
39 name: 'RequestCache "only-if-cached" (with "same-origin") uses cached sa me-origin redirects to same-origin content',
40 state: "fresh",
41 request_cache: ["default", "only-if-cached"],
42 redirect: "same-origin",
43 expected_validation_headers: [false, false],
44 expected_no_cache_headers: [false, false],
45 },
46 {
47 name: 'RequestCache "only-if-cached" (with "same-origin") uses cached sa me-origin redirects to same-origin content',
48 state: "stale",
49 request_cache: ["default", "only-if-cached"],
50 redirect: "same-origin",
51 expected_validation_headers: [false, false],
52 expected_no_cache_headers: [false, false],
53 },
54 {
55 name: 'RequestCache "only-if-cached" (with "same-origin") does not follo w redirects across origins and rejects',
56 state: "fresh",
57 request_cache: ["default", "only-if-cached"],
58 redirect: "cross-origin",
59 response: [null, "error"],
60 expected_validation_headers: [false, false],
61 expected_no_cache_headers: [false, false],
62 },
63 {
64 name: 'RequestCache "only-if-cached" (with "same-origin") does not follo w redirects across origins and rejects',
65 state: "stale",
66 request_cache: ["default", "only-if-cached"],
67 redirect: "cross-origin",
68 response: [null, "error"],
69 expected_validation_headers: [false, false],
70 expected_no_cache_headers: [false, false],
71 },
72 ];
73 run_tests(tests);
74 </script>
75 </body>
76 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698