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

Side by Side Diff: net/quic/core/quic_packet_generator_test.cc

Issue 2808273006: Landing Recent QUIC changes until Sun Apr 9 16:12:55 (Closed)
Patch Set: increment enabled_options in e2e test Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_framer_test.cc ('k') | net/quic/core/quic_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/quic_packet_generator.h" 5 #include "net/quic/core/quic_packet_generator.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 EXPECT_QUIC_BUG(generator_.FinishBatchOperations(), 845 EXPECT_QUIC_BUG(generator_.FinishBatchOperations(),
846 "packet_number_length 1 is too small " 846 "packet_number_length 1 is too small "
847 "for least_unacked_delta: 1001"); 847 "for least_unacked_delta: 1001");
848 } 848 }
849 849
850 // Regression test for b/31486443. 850 // Regression test for b/31486443.
851 TEST_F(QuicPacketGeneratorTest, ConnectionCloseFrameLargerThanPacketSize) { 851 TEST_F(QuicPacketGeneratorTest, ConnectionCloseFrameLargerThanPacketSize) {
852 delegate_.SetCanWriteAnything(); 852 delegate_.SetCanWriteAnything();
853 QuicConnectionCloseFrame* frame = new QuicConnectionCloseFrame(); 853 QuicConnectionCloseFrame* frame = new QuicConnectionCloseFrame();
854 frame->error_code = QUIC_PACKET_WRITE_ERROR; 854 frame->error_code = QUIC_PACKET_WRITE_ERROR;
855 char buf[2000]; 855 char buf[2000] = {};
856 QuicStringPiece error_details(buf, 2000); 856 QuicStringPiece error_details(buf, 2000);
857 frame->error_details = error_details.as_string(); 857 frame->error_details = error_details.as_string();
858 EXPECT_CALL(delegate_, 858 EXPECT_CALL(delegate_,
859 OnUnrecoverableError(QUIC_FAILED_TO_SERIALIZE_PACKET, 859 OnUnrecoverableError(QUIC_FAILED_TO_SERIALIZE_PACKET,
860 "Single frame cannot fit into a packet", _)); 860 "Single frame cannot fit into a packet", _));
861 EXPECT_QUIC_BUG(generator_.AddControlFrame(QuicFrame(frame)), ""); 861 EXPECT_QUIC_BUG(generator_.AddControlFrame(QuicFrame(frame)), "");
862 EXPECT_TRUE(generator_.HasQueuedFrames()); 862 EXPECT_TRUE(generator_.HasQueuedFrames());
863 } 863 }
864 864
865 } // namespace test 865 } // namespace test
866 } // namespace net 866 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_framer_test.cc ('k') | net/quic/core/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698