mirror of
https://github.com/servo/servo.git
synced 2025-10-01 09:09:15 +01:00
handle caching of response with a body of ResponseBody::Receiving
This commit is contained in:
parent
609e975c50
commit
993e2f55ed
5 changed files with 80 additions and 43 deletions
|
@ -66360,7 +66360,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"mozilla/http-cache-xhr.html": [
|
||||
"0f8e347991f25a08ba5f8bdff0ef99055e33e7a1",
|
||||
"d4747fdc9ec6acc50718c13a668451987a44d219",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/http-cache.html": [
|
||||
|
|
|
@ -17,14 +17,6 @@
|
|||
],
|
||||
response_body: '12'
|
||||
},
|
||||
{
|
||||
response_status: [200, 'OK'],
|
||||
"response_headers": [
|
||||
['Expires', http_date(100000)],
|
||||
['Last-Modified', http_date(0)]
|
||||
],
|
||||
response_body: '12'
|
||||
},
|
||||
{
|
||||
response_status: [200, 'OK'],
|
||||
"response_headers": [
|
||||
|
@ -45,19 +37,10 @@
|
|||
assert_equals(state.length, 2);
|
||||
// The empty, aborted response.
|
||||
assert_equals(client.response, "");
|
||||
// The complete, non-aborted, response.
|
||||
assert_equals(client2.response, "12");
|
||||
test.done();
|
||||
}));
|
||||
var client3 = new XMLHttpRequest();
|
||||
client3.onloadend = test.step_func(function(event) {
|
||||
server_state(uuid).then(test.step_func(function(state) {
|
||||
// No server hits, the response from client2 was cached and re-used.
|
||||
assert_equals(state.length, 0)
|
||||
assert_equals(client3.response, '12');
|
||||
test.done();
|
||||
}));
|
||||
});
|
||||
client3.open("GET", url);
|
||||
client3.send();
|
||||
});
|
||||
client.onabort = test.step_func(function() {
|
||||
client2.open("GET", url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue