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

Unified Diff: net/quic/test_tools/quic_test_utils.h

Issue 2462823002: Deletes dead code. (Closed)
Patch Set: Updated patchset dependency Created 4 years, 2 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/quic/test_tools/mock_quic_spdy_client_stream.h ('k') | net/tools/quic/quic_client_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_test_utils.h
diff --git a/net/quic/test_tools/quic_test_utils.h b/net/quic/test_tools/quic_test_utils.h
index ed6d930a0efd6e41d4f2f46117ef789e64a5bc5a..3d3b6f57ed8c603aa6ebff75fdff90853710497b 100644
--- a/net/quic/test_tools/quic_test_utils.h
+++ b/net/quic/test_tools/quic_test_utils.h
@@ -1047,6 +1047,19 @@ void ExpectApproxEq(T expected, T actual, float relative_margin) {
EXPECT_LE(expected - absolute_margin, actual);
}
+template <typename T>
+QuicHeaderList AsHeaderList(const T& container) {
+ QuicHeaderList l;
+ l.OnHeaderBlockStart();
+ size_t total_size = 0;
+ for (auto p : container) {
+ total_size += p.first.size() + p.second.size();
+ l.OnHeader(p.first, p.second);
+ }
+ l.OnHeaderBlockEnd(total_size);
+ return l;
+}
+
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/test_tools/mock_quic_spdy_client_stream.h ('k') | net/tools/quic/quic_client_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698