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

Side by Side Diff: net/ssl/ssl_connection_status_flags_unittest.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/ssl/ssl_connection_status_flags.h ('k') | net/ssl/ssl_key_logger.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ssl/ssl_connection_status_flags.h" 5 #include "net/ssl/ssl_connection_status_flags.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace net { 9 namespace net {
10 10
11 namespace { 11 namespace {
12 12
13 TEST(SSLConnectionStatusTest, SetCipherSuite) { 13 TEST(SSLConnectionStatusTest, SetCipherSuite) {
14 int connection_status = 0xDEADBEEF; 14 int connection_status = 0xDEADBEEF;
15 int expected_version = SSLConnectionStatusToVersion(connection_status); 15 int expected_version = SSLConnectionStatusToVersion(connection_status);
16 16
17 SSLConnectionStatusSetCipherSuite(12345, &connection_status); 17 SSLConnectionStatusSetCipherSuite(12345, &connection_status);
18 EXPECT_EQ(12345U, SSLConnectionStatusToCipherSuite(connection_status)); 18 EXPECT_EQ(12345U, SSLConnectionStatusToCipherSuite(connection_status));
19 EXPECT_EQ(expected_version, SSLConnectionStatusToVersion(connection_status)); 19 EXPECT_EQ(expected_version, SSLConnectionStatusToVersion(connection_status));
20 } 20 }
21 21
22 TEST(SSLConnectionStatusTest, SetVersion) { 22 TEST(SSLConnectionStatusTest, SetVersion) {
23 int connection_status = 0xDEADBEEF; 23 int connection_status = 0xDEADBEEF;
24 uint16 expected_cipher_suite = 24 uint16_t expected_cipher_suite =
25 SSLConnectionStatusToCipherSuite(connection_status); 25 SSLConnectionStatusToCipherSuite(connection_status);
26 26
27 SSLConnectionStatusSetVersion(SSL_CONNECTION_VERSION_TLS1_2, 27 SSLConnectionStatusSetVersion(SSL_CONNECTION_VERSION_TLS1_2,
28 &connection_status); 28 &connection_status);
29 EXPECT_EQ(SSL_CONNECTION_VERSION_TLS1_2, 29 EXPECT_EQ(SSL_CONNECTION_VERSION_TLS1_2,
30 SSLConnectionStatusToVersion(connection_status)); 30 SSLConnectionStatusToVersion(connection_status));
31 EXPECT_EQ(expected_cipher_suite, 31 EXPECT_EQ(expected_cipher_suite,
32 SSLConnectionStatusToCipherSuite(connection_status)); 32 SSLConnectionStatusToCipherSuite(connection_status));
33 } 33 }
34 34
35 } // namespace 35 } // namespace
36 36
37 } // namespace net 37 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_connection_status_flags.h ('k') | net/ssl/ssl_key_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698