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

Side by Side Diff: net/quic/core/crypto/crypto_handshake_message_test.cc

Issue 2848203002: Add a platform implementation of QuicTest and QuicTestWithParam (Closed)
Patch Set: net/quic/platform/impl/quic_test_impl.cc Created 3 years, 7 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/crypto/crypto_handshake_message.h" 5 #include "net/quic/core/crypto/crypto_handshake_message.h"
6 6
7 #include "net/quic/core/crypto/crypto_handshake.h" 7 #include "net/quic/core/crypto/crypto_handshake.h"
8 #include "net/quic/core/crypto/crypto_protocol.h" 8 #include "net/quic/core/crypto/crypto_protocol.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "net/quic/platform/api/quic_test.h"
10 10
11 namespace net { 11 namespace net {
12 namespace test { 12 namespace test {
13 namespace { 13 namespace {
14 14
15 class CryptoHandshakeMessageTest 15 class CryptoHandshakeMessageTest : public QuicTestWithParam<Perspective> {};
16 : public ::testing::TestWithParam<Perspective> {};
17 16
18 TEST_P(CryptoHandshakeMessageTest, DebugString) { 17 TEST_P(CryptoHandshakeMessageTest, DebugString) {
19 const char* str = "SHLO<\n>"; 18 const char* str = "SHLO<\n>";
20 19
21 CryptoHandshakeMessage message; 20 CryptoHandshakeMessage message;
22 message.set_tag(kSHLO); 21 message.set_tag(kSHLO);
23 EXPECT_EQ(str, message.DebugString(GetParam())); 22 EXPECT_EQ(str, message.DebugString(GetParam()));
24 23
25 // Test copy 24 // Test copy
26 CryptoHandshakeMessage message2(message); 25 CryptoHandshakeMessage message2(message);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 TEST_P(CryptoHandshakeMessageTest, HasStringPiece) { 122 TEST_P(CryptoHandshakeMessageTest, HasStringPiece) {
124 CryptoHandshakeMessage message; 123 CryptoHandshakeMessage message;
125 EXPECT_FALSE(message.HasStringPiece(kRCID)); 124 EXPECT_FALSE(message.HasStringPiece(kRCID));
126 message.SetStringPiece(kRCID, "foo"); 125 message.SetStringPiece(kRCID, "foo");
127 EXPECT_TRUE(message.HasStringPiece(kRCID)); 126 EXPECT_TRUE(message.HasStringPiece(kRCID));
128 } 127 }
129 128
130 } // namespace 129 } // namespace
131 } // namespace test 130 } // namespace test
132 } // namespace net 131 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/crypto/crypto_framer_test.cc ('k') | net/quic/core/crypto/crypto_secret_boxer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698