summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/url_request/url_request_unittest.cc')
-rw-r--r--net/url_request/url_request_unittest.cc26
1 files changed, 18 insertions, 8 deletions
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index a8b47d2..0877768 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -203,14 +203,24 @@ TEST_F(URLRequestTestHTTP, GetTest_NoCache) {
EXPECT_FALSE(d.received_data_before_response());
EXPECT_NE(0, d.bytes_received());
- // The first and last entries of the LoadLog should be for
- // TYPE_URL_REQUEST_START.
- net::ExpectLogContains(r.load_log(), 0,
- net::LoadLog::TYPE_URL_REQUEST_START,
- net::LoadLog::PHASE_BEGIN);
- net::ExpectLogContains(r.load_log(), r.load_log()->events().size() - 1,
- net::LoadLog::TYPE_URL_REQUEST_START,
- net::LoadLog::PHASE_END);
+ // The first part of the log will be for URL_REQUEST_START.
+ // After that, there should be an HTTP_TRANSACTION_READ_BODY
+ EXPECT_TRUE(
+ net::LogContains(*r.load_log(), 0,
+ net::LoadLog::TYPE_URL_REQUEST_START,
+ net::LoadLog::PHASE_BEGIN));
+ EXPECT_TRUE(
+ net::LogContains(*r.load_log(), -3,
+ net::LoadLog::TYPE_URL_REQUEST_START,
+ net::LoadLog::PHASE_END));
+ EXPECT_TRUE(
+ net::LogContains(*r.load_log(), -2,
+ net::LoadLog::TYPE_HTTP_TRANSACTION_READ_BODY,
+ net::LoadLog::PHASE_BEGIN));
+ EXPECT_TRUE(
+ net::LogContains(*r.load_log(), -1,
+ net::LoadLog::TYPE_HTTP_TRANSACTION_READ_BODY,
+ net::LoadLog::PHASE_END));
}
}