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

Unified Diff: net/quic/core/quic_packet_creator_test.cc

Issue 2249813002: Create EXPECT_QUIC_BUG macro, and modify QUIC tests to use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/quic/core/quic_one_block_arena_test.cc ('k') | net/quic/core/quic_packet_generator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_packet_creator_test.cc
diff --git a/net/quic/core/quic_packet_creator_test.cc b/net/quic/core/quic_packet_creator_test.cc
index ec7156a2307e3150a417465c0c5aefea4bd81d1d..c207b20a9de9360e0a145d6afb420ffe2408b542 100644
--- a/net/quic/core/quic_packet_creator_test.cc
+++ b/net/quic/core/quic_packet_creator_test.cc
@@ -131,7 +131,6 @@ class QuicPacketCreatorTest : public ::testing::TestWithParam<TestParams> {
&buffer_allocator_,
&delegate_),
serialized_packet_(creator_.NoPacket()) {
- FLAGS_quic_always_log_bugs_for_tests = true;
creator_.set_connection_id_length(GetParam().connection_id_length);
creator_.SetEncrypter(ENCRYPTION_INITIAL, new NullEncrypter());
@@ -423,8 +422,8 @@ TEST_P(QuicPacketCreatorTest, ChangeSequenceNumberLengthMidPacketDoesNothing) {
// Now change packet number length and expect a QUIC_BUG and no change in
// packet number length.
- EXPECT_DFATAL(creator_.UpdatePacketNumberLength(0, 256),
- "Called UpdatePacketNumberLength with 1 queued_frames.");
+ EXPECT_QUIC_BUG(creator_.UpdatePacketNumberLength(0, 256),
+ "Called UpdatePacketNumberLength with 1 queued_frames.");
EXPECT_EQ(PACKET_1BYTE_PACKET_NUMBER,
QuicPacketCreatorPeer::GetPacketNumberLength(&creator_));
delete ack_frame.ack_frame;
@@ -1181,8 +1180,8 @@ TEST_P(QuicPacketCreatorTest, SetCurrentPath) {
// Change current path.
QuicPathId kPathId1 = 1;
- EXPECT_DFATAL(creator_.SetCurrentPath(kPathId1, 1, 0),
- "Unable to change paths when a packet is under construction");
+ EXPECT_QUIC_BUG(creator_.SetCurrentPath(kPathId1, 1, 0),
+ "Unable to change paths when a packet is under construction");
EXPECT_CALL(delegate_, OnSerializedPacket(_))
.Times(1)
.WillRepeatedly(
@@ -1309,8 +1308,8 @@ TEST_P(QuicPacketCreatorTest, AddUnencryptedStreamDataClosesConnection) {
EXPECT_CALL(delegate_, OnUnrecoverableError(_, _, _));
QuicStreamFrame stream_frame(kHeadersStreamId, /*fin=*/false, 0u,
StringPiece());
- EXPECT_DFATAL(creator_.AddSavedFrame(QuicFrame(&stream_frame)),
- "Cannot send stream data without encryption.");
+ EXPECT_QUIC_BUG(creator_.AddSavedFrame(QuicFrame(&stream_frame)),
+ "Cannot send stream data without encryption.");
}
TEST_P(QuicPacketCreatorTest, ChloTooLarge) {
@@ -1327,7 +1326,7 @@ TEST_P(QuicPacketCreatorTest, ChloTooLarge) {
QuicFrame frame;
EXPECT_CALL(delegate_,
OnUnrecoverableError(QUIC_CRYPTO_CHLO_TOO_LARGE, _, _));
- EXPECT_DFATAL(
+ EXPECT_QUIC_BUG(
creator_.ConsumeData(1u, data_iovec, 0u, 0u, false, false, &frame),
"Client hello won't fit in a single packet.");
}
« no previous file with comments | « net/quic/core/quic_one_block_arena_test.cc ('k') | net/quic/core/quic_packet_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698