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

Unified Diff: net/spdy/spdy_test_utils.cc

Issue 1273743002: Add CompareSpdyHeaderBlocks() test helper method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/spdy/spdy_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_utils.cc
diff --git a/net/spdy/spdy_test_utils.cc b/net/spdy/spdy_test_utils.cc
index 7f0d4e2a86b66a58298c394ed3dd51a82b0f80f4..eb721ef32c0348a90e1e173c6b52435488ed3f31 100644
--- a/net/spdy/spdy_test_utils.cc
+++ b/net/spdy/spdy_test_utils.cc
@@ -17,7 +17,6 @@
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
-
namespace test {
std::string HexDumpWithMarks(const unsigned char* data, int length,
@@ -130,6 +129,11 @@ void SetFrameLength(SpdyFrame* frame,
}
}
+bool CompareSpdyHeaderBlocks(const SpdyHeaderBlock& a,
+ const SpdyHeaderBlock& b) {
+ return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin());
+}
+
std::string a2b_hex(const char* hex_data) {
std::vector<uint8> output;
std::string result;
@@ -169,5 +173,4 @@ void AddPin(TransportSecurityState* state,
}
} // namespace test
-
} // namespace net
« no previous file with comments | « net/spdy/spdy_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698