mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d
This commit is contained in:
parent
65dd6d4340
commit
ccdb0a3458
1428 changed files with 118036 additions and 9786 deletions
|
@ -0,0 +1,180 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Request cache - default with conditional requests</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="request-cache.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
var tests = [
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Modified-Since header is treated similarly to "no-store"',
|
||||
state: "stale",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{}, {"If-Modified-Since": now.toGMTString()}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [false, true],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Modified-Since header is treated similarly to "no-store"',
|
||||
state: "fresh",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{}, {"If-Modified-Since": now.toGMTString()}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [false, true],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Modified-Since header is treated similarly to "no-store"',
|
||||
state: "stale",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{"If-Modified-Since": now.toGMTString()}, {}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [true, false],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Modified-Since header is treated similarly to "no-store"',
|
||||
state: "fresh",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{"If-Modified-Since": now.toGMTString()}, {}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [true, false],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-None-Match header is treated similarly to "no-store"',
|
||||
state: "stale",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{}, {"If-None-Match": '"foo"'}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [false, true],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-None-Match header is treated similarly to "no-store"',
|
||||
state: "fresh",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{}, {"If-None-Match": '"foo"'}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [false, true],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-None-Match header is treated similarly to "no-store"',
|
||||
state: "stale",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{"If-None-Match": '"foo"'}, {}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [true, false],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-None-Match header is treated similarly to "no-store"',
|
||||
state: "fresh",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{"If-None-Match": '"foo"'}, {}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [true, false],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Unmodified-Since header is treated similarly to "no-store"',
|
||||
state: "stale",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{}, {"If-Unmodified-Since": now.toGMTString()}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [false, true],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Unmodified-Since header is treated similarly to "no-store"',
|
||||
state: "fresh",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{}, {"If-Unmodified-Since": now.toGMTString()}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [false, true],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Unmodified-Since header is treated similarly to "no-store"',
|
||||
state: "stale",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{"If-Unmodified-Since": now.toGMTString()}, {}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [true, false],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Unmodified-Since header is treated similarly to "no-store"',
|
||||
state: "fresh",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{"If-Unmodified-Since": now.toGMTString()}, {}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [true, false],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Match header is treated similarly to "no-store"',
|
||||
state: "stale",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{}, {"If-Match": '"foo"'}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [false, true],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Match header is treated similarly to "no-store"',
|
||||
state: "fresh",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{}, {"If-Match": '"foo"'}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [false, true],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Match header is treated similarly to "no-store"',
|
||||
state: "stale",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{"If-Match": '"foo"'}, {}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [true, false],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Match header is treated similarly to "no-store"',
|
||||
state: "fresh",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{"If-Match": '"foo"'}, {}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [true, false],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Range header is treated similarly to "no-store"',
|
||||
state: "stale",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{}, {"If-Range": '"foo"'}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [false, true],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Range header is treated similarly to "no-store"',
|
||||
state: "fresh",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{}, {"If-Range": '"foo"'}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [false, true],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Range header is treated similarly to "no-store"',
|
||||
state: "stale",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{"If-Range": '"foo"'}, {}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [true, false],
|
||||
},
|
||||
{
|
||||
name: 'RequestCache "default" mode with an If-Range header is treated similarly to "no-store"',
|
||||
state: "fresh",
|
||||
request_cache: ["default", "default"],
|
||||
request_headers: [{"If-Range": '"foo"'}, {}],
|
||||
expected_validation_headers: [false, false],
|
||||
expected_no_cache_headers: [true, false],
|
||||
},
|
||||
];
|
||||
run_tests(tests);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue