mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
124
tests/wpt/web-platform-tests/fetch/http-cache/304-update.html
Normal file
124
tests/wpt/web-platform-tests/fetch/http-cache/304-update.html
Normal file
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue