handle caching of response with a body of ResponseBody::Receiving

This commit is contained in:
Gregory Terzian 2017-11-26 21:31:26 +08:00
parent 609e975c50
commit 993e2f55ed
5 changed files with 80 additions and 43 deletions

View file

@ -66360,7 +66360,7 @@
"testharness"
],
"mozilla/http-cache-xhr.html": [
"0f8e347991f25a08ba5f8bdff0ef99055e33e7a1",
"d4747fdc9ec6acc50718c13a668451987a44d219",
"testharness"
],
"mozilla/http-cache.html": [

View file

@ -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);