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

Side by Side Diff: net/quic/crypto/crypto_framer_test.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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/crypto/crypto_framer.cc ('k') | net/quic/crypto/crypto_handshake.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/crypto/crypto_framer.h" 5 #include "net/quic/crypto/crypto_framer.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 ASSERT_TRUE(data.get() != nullptr); 152 ASSERT_TRUE(data.get() != nullptr);
153 153
154 test::CompareCharArraysWithHexError("constructed packet", data->data(), 154 test::CompareCharArraysWithHexError("constructed packet", data->data(),
155 data->length(), AsChars(packet), 155 data->length(), AsChars(packet),
156 arraysize(packet)); 156 arraysize(packet));
157 } 157 }
158 158
159 TEST(CryptoFramerTest, ConstructHandshakeMessageTooManyEntries) { 159 TEST(CryptoFramerTest, ConstructHandshakeMessageTooManyEntries) {
160 CryptoHandshakeMessage message; 160 CryptoHandshakeMessage message;
161 message.set_tag(0xFFAA7733); 161 message.set_tag(0xFFAA7733);
162 for (uint32 key = 1; key <= kMaxEntries + 1; ++key) { 162 for (uint32_t key = 1; key <= kMaxEntries + 1; ++key) {
163 message.SetStringPiece(key, "abcdef"); 163 message.SetStringPiece(key, "abcdef");
164 } 164 }
165 165
166 CryptoFramer framer; 166 CryptoFramer framer;
167 scoped_ptr<QuicData> data(framer.ConstructHandshakeMessage(message)); 167 scoped_ptr<QuicData> data(framer.ConstructHandshakeMessage(message));
168 EXPECT_TRUE(data.get() == nullptr); 168 EXPECT_TRUE(data.get() == nullptr);
169 } 169 }
170 170
171 TEST(CryptoFramerTest, ConstructHandshakeMessageMinimumSize) { 171 TEST(CryptoFramerTest, ConstructHandshakeMessageMinimumSize) {
172 CryptoHandshakeMessage message; 172 CryptoHandshakeMessage message;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 }; 462 };
463 463
464 EXPECT_TRUE( 464 EXPECT_TRUE(
465 framer.ProcessInput(StringPiece(AsChars(input), arraysize(input)))); 465 framer.ProcessInput(StringPiece(AsChars(input), arraysize(input))));
466 EXPECT_EQ(0, visitor.error_count_); 466 EXPECT_EQ(0, visitor.error_count_);
467 } 467 }
468 468
469 } // namespace test 469 } // namespace test
470 470
471 } // namespace net 471 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_framer.cc ('k') | net/quic/crypto/crypto_handshake.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698