summaryrefslogtreecommitdiffstats
path: root/net/http/http_transaction_unittest.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/http/http_transaction_unittest.h')
-rw-r--r--net/http/http_transaction_unittest.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/http/http_transaction_unittest.h b/net/http/http_transaction_unittest.h
index aef6693..1f4919f 100644
--- a/net/http/http_transaction_unittest.h
+++ b/net/http/http_transaction_unittest.h
@@ -47,6 +47,8 @@ struct MockTransaction {
int load_flags;
const char* status;
const char* response_headers;
+ // If |response_time| is unspecified, the current time will be used.
+ base::Time response_time;
const char* data;
int test_mode;
MockTransactionHandler handler;
@@ -218,7 +220,11 @@ class MockNetworkTransaction : public net::HttpTransaction {
response_.request_time = base::Time::Now();
response_.was_cached = false;
+
response_.response_time = base::Time::Now();
+ if (!t->response_time.is_null())
+ response_.response_time = t->response_time;
+
response_.headers = new net::HttpResponseHeaders(header_data);
response_.ssl_info.cert_status = t->cert_status;
data_ = resp_data;