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

Unified Diff: net/quic/quic_framer_test.cc

Issue 1009543004: Create a Perspective enum to use instead of a bool is_server to improve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NET_EXPORT_PRIVATE to fix compiler error Created 5 years, 9 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_framer.cc ('k') | net/quic/quic_headers_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_framer_test.cc
diff --git a/net/quic/quic_framer_test.cc b/net/quic/quic_framer_test.cc
index 69373e0590d98bc4c3d6e5c4fa103384372cd342..fd3fb15e04bc5cca2eea2112d1cac7ff3f7efa8a 100644
--- a/net/quic/quic_framer_test.cc
+++ b/net/quic/quic_framer_test.cc
@@ -342,7 +342,7 @@ class QuicFramerTest : public ::testing::TestWithParam<QuicVersion> {
: encrypter_(new test::TestEncrypter()),
decrypter_(new test::TestDecrypter()),
start_(QuicTime::Zero().Add(QuicTime::Delta::FromMicroseconds(0x10))),
- framer_(QuicSupportedVersions(), start_, true) {
+ framer_(QuicSupportedVersions(), start_, Perspective::IS_SERVER) {
version_ = GetParam();
framer_.set_version(version_);
framer_.SetDecrypter(decrypter_, ENCRYPTION_NONE);
@@ -2769,7 +2769,7 @@ TEST_P(QuicFramerTest, VersionNegotiationPacket) {
'Q', '2', '.', '0',
};
- QuicFramerPeer::SetIsServer(&framer_, false);
+ QuicFramerPeer::SetPerspective(&framer_, Perspective::IS_CLIENT);
QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
EXPECT_TRUE(framer_.ProcessPacket(encrypted));
@@ -3193,7 +3193,7 @@ TEST_P(QuicFramerTest, BuildStreamFramePacketWithVersionFlag) {
'!',
};
- QuicFramerPeer::SetIsServer(&framer_, false);
+ QuicFramerPeer::SetPerspective(&framer_, Perspective::IS_CLIENT);
scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
ASSERT_TRUE(data != nullptr);
« no previous file with comments | « net/quic/quic_framer.cc ('k') | net/quic/quic_headers_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698