| OLD | NEW |
| 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/quic_framer.h" | 5 #include "net/quic/quic_framer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2975 QuicCongestionFeedbackFrame congestion_feedback_frame; | 2975 QuicCongestionFeedbackFrame congestion_feedback_frame; |
| 2976 congestion_feedback_frame.type = | 2976 congestion_feedback_frame.type = |
| 2977 static_cast<CongestionFeedbackType>(kFixRate + 1); | 2977 static_cast<CongestionFeedbackType>(kFixRate + 1); |
| 2978 | 2978 |
| 2979 QuicFrames frames; | 2979 QuicFrames frames; |
| 2980 frames.push_back(QuicFrame(&congestion_feedback_frame)); | 2980 frames.push_back(QuicFrame(&congestion_feedback_frame)); |
| 2981 | 2981 |
| 2982 scoped_ptr<QuicPacket> data; | 2982 scoped_ptr<QuicPacket> data; |
| 2983 EXPECT_DFATAL( | 2983 EXPECT_DFATAL( |
| 2984 data.reset(framer_.BuildUnsizedDataPacket(header, frames).packet), | 2984 data.reset(framer_.BuildUnsizedDataPacket(header, frames).packet), |
| 2985 "AppendQuicCongestionFeedbackFramePayload failed"); | 2985 "AppendQuicCongestionFeedbackFrame failed"); |
| 2986 ASSERT_TRUE(data == NULL); | 2986 ASSERT_TRUE(data == NULL); |
| 2987 } | 2987 } |
| 2988 | 2988 |
| 2989 TEST_P(QuicFramerTest, BuildRstFramePacket) { | 2989 TEST_P(QuicFramerTest, BuildRstFramePacket) { |
| 2990 QuicPacketHeader header; | 2990 QuicPacketHeader header; |
| 2991 header.public_header.guid = GG_UINT64_C(0xFEDCBA9876543210); | 2991 header.public_header.guid = GG_UINT64_C(0xFEDCBA9876543210); |
| 2992 header.public_header.reset_flag = false; | 2992 header.public_header.reset_flag = false; |
| 2993 header.public_header.version_flag = false; | 2993 header.public_header.version_flag = false; |
| 2994 header.fec_flag = false; | 2994 header.fec_flag = false; |
| 2995 header.entropy_flag = false; | 2995 header.entropy_flag = false; |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3516 EXPECT_CALL(visitor, OnPacketComplete()); | 3516 EXPECT_CALL(visitor, OnPacketComplete()); |
| 3517 EXPECT_CALL(visitor, OnUnauthenticatedPublicHeader(_)).WillOnce(Return(true)); | 3517 EXPECT_CALL(visitor, OnUnauthenticatedPublicHeader(_)).WillOnce(Return(true)); |
| 3518 | 3518 |
| 3519 QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false); | 3519 QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false); |
| 3520 EXPECT_TRUE(framer_.ProcessPacket(encrypted)); | 3520 EXPECT_TRUE(framer_.ProcessPacket(encrypted)); |
| 3521 EXPECT_EQ(QUIC_NO_ERROR, framer_.error()); | 3521 EXPECT_EQ(QUIC_NO_ERROR, framer_.error()); |
| 3522 } | 3522 } |
| 3523 | 3523 |
| 3524 } // namespace test | 3524 } // namespace test |
| 3525 } // namespace net | 3525 } // namespace net |
| OLD | NEW |