Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: net/url_request/url_request_unittest.cc

Issue 194018: Add trace-point for URLRequest to the LoadLog.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
===================================================================
--- net/url_request/url_request_unittest.cc (revision 25369)
+++ net/url_request/url_request_unittest.cc (working copy)
@@ -24,6 +24,8 @@
#include "base/string_util.h"
#include "net/base/cookie_monster.h"
#include "net/base/load_flags.h"
+#include "net/base/load_log.h"
+#include "net/base/load_log_unittest.h"
#include "net/base/net_errors.h"
#include "net/base/net_module.h"
#include "net/base/net_util.h"
@@ -202,6 +204,15 @@
EXPECT_EQ(1, d.response_started_count());
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);
}
}
« no previous file with comments | « net/url_request/url_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698