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

Side by Side Diff: net/quic/quic_framer_test.cc

Issue 304623002: clang_tidy: remove redundant .get() calls on smart ptrs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/quic/quic_packet_creator_test.cc » ('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/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 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 'h', 'e', 'l', 'l', 1482 'h', 'e', 'l', 'l',
1483 'o', ' ', 'w', 'o', 1483 'o', ' ', 'w', 'o',
1484 'r', 'l', 'd', '!', 1484 'r', 'l', 'd', '!',
1485 }; 1485 };
1486 1486
1487 QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false); 1487 QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
1488 EXPECT_TRUE(framer_.ProcessPacket(encrypted)); 1488 EXPECT_TRUE(framer_.ProcessPacket(encrypted));
1489 1489
1490 EXPECT_EQ(QUIC_NO_ERROR, framer_.error()); 1490 EXPECT_EQ(QUIC_NO_ERROR, framer_.error());
1491 ASSERT_TRUE(visitor_.header_.get()); 1491 ASSERT_TRUE(visitor_.header_.get());
1492 EXPECT_TRUE(visitor_.header_.get()->public_header.version_flag); 1492 EXPECT_TRUE(visitor_.header_->public_header.version_flag);
1493 EXPECT_EQ(GetParam(), visitor_.header_.get()->public_header.versions[0]); 1493 EXPECT_EQ(GetParam(), visitor_.header_->public_header.versions[0]);
1494 EXPECT_TRUE(CheckDecryption(encrypted, kIncludeVersion)); 1494 EXPECT_TRUE(CheckDecryption(encrypted, kIncludeVersion));
1495 1495
1496 ASSERT_EQ(1u, visitor_.stream_frames_.size()); 1496 ASSERT_EQ(1u, visitor_.stream_frames_.size());
1497 EXPECT_EQ(0u, visitor_.ack_frames_.size()); 1497 EXPECT_EQ(0u, visitor_.ack_frames_.size());
1498 EXPECT_EQ(static_cast<uint64>(0x01020304), 1498 EXPECT_EQ(static_cast<uint64>(0x01020304),
1499 visitor_.stream_frames_[0]->stream_id); 1499 visitor_.stream_frames_[0]->stream_id);
1500 EXPECT_TRUE(visitor_.stream_frames_[0]->fin); 1500 EXPECT_TRUE(visitor_.stream_frames_[0]->fin);
1501 EXPECT_EQ(GG_UINT64_C(0xBA98FEDC32107654), 1501 EXPECT_EQ(GG_UINT64_C(0xBA98FEDC32107654),
1502 visitor_.stream_frames_[0]->offset); 1502 visitor_.stream_frames_[0]->offset);
1503 CheckStreamFrameData("hello world!", visitor_.stream_frames_[0]); 1503 CheckStreamFrameData("hello world!", visitor_.stream_frames_[0]);
(...skipping 3244 matching lines...) Expand 10 before | Expand all | Expand 10 after
4748 EXPECT_CALL(visitor, OnPacketComplete()); 4748 EXPECT_CALL(visitor, OnPacketComplete());
4749 EXPECT_CALL(visitor, OnUnauthenticatedPublicHeader(_)).WillOnce(Return(true)); 4749 EXPECT_CALL(visitor, OnUnauthenticatedPublicHeader(_)).WillOnce(Return(true));
4750 4750
4751 QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false); 4751 QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
4752 EXPECT_TRUE(framer_.ProcessPacket(encrypted)); 4752 EXPECT_TRUE(framer_.ProcessPacket(encrypted));
4753 EXPECT_EQ(QUIC_NO_ERROR, framer_.error()); 4753 EXPECT_EQ(QUIC_NO_ERROR, framer_.error());
4754 } 4754 }
4755 4755
4756 } // namespace test 4756 } // namespace test
4757 } // namespace net 4757 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_packet_creator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698