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

Unified Diff: net/quic/quic_utils_test.cc

Issue 47283002: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compilation error Created 7 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/quic_utils.cc ('k') | net/quic/reliable_quic_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_utils_test.cc
diff --git a/net/quic/quic_utils_test.cc b/net/quic/quic_utils_test.cc
index 0e50aec0ec1dd36e247cd7f87d1e97afd27db8b7..0a0355f7d25df05e116580204f321cf68daad7d6 100644
--- a/net/quic/quic_utils_test.cc
+++ b/net/quic/quic_utils_test.cc
@@ -4,6 +4,7 @@
#include "net/quic/quic_utils.h"
+#include "net/quic/crypto/crypto_protocol.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::StringPiece;
@@ -68,6 +69,21 @@ TEST(QuicUtilsTest, StringToHexASCIIDumpSuccess) {
string(reinterpret_cast<const char*>(kString), sizeof(kString))));
}
+TEST(QuicUtilsTest, TagToString) {
+ EXPECT_EQ("SCFG",
+ QuicUtils::TagToString(kSCFG));
+ EXPECT_EQ("SNO ",
+ QuicUtils::TagToString(kServerNonceTag));
+ EXPECT_EQ("CRT ",
+ QuicUtils::TagToString(kCertificateTag));
+ EXPECT_EQ("CHLO",
+ QuicUtils::TagToString(MakeQuicTag('C', 'H', 'L', 'O')));
+ // A tag that contains a non-printing character will be printed as a decimal
+ // number.
+ EXPECT_EQ("525092931",
+ QuicUtils::TagToString(MakeQuicTag('C', 'H', 'L', '\x1f')));
+}
+
} // namespace
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/quic_utils.cc ('k') | net/quic/reliable_quic_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698