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

Unified Diff: net/ssl/ssl_connection_status_flags_unittest.cc

Issue 291093002: Fail the SPDY transaction if it does not meet TLS base requirements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address forgotten comment. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/ssl/ssl_connection_status_flags.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/ssl_connection_status_flags_unittest.cc
diff --git a/net/ssl/ssl_connection_status_flags_unittest.cc b/net/ssl/ssl_connection_status_flags_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3f79b922cee2f64d115171b5f1d2ed1509065e63
--- /dev/null
+++ b/net/ssl/ssl_connection_status_flags_unittest.cc
@@ -0,0 +1,37 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/ssl/ssl_connection_status_flags.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace net {
+
+namespace {
+
+TEST(SSLConnectionStatusTest, SetCipherSuite) {
+ int connection_status = 0xDEADBEEF;
+ int expected_version = SSLConnectionStatusToVersion(connection_status);
+
+ SSLConnectionStatusSetCipherSuite(12345, &connection_status);
+ EXPECT_EQ(12345, SSLConnectionStatusToCipherSuite(connection_status));
+ EXPECT_EQ(expected_version, SSLConnectionStatusToVersion(connection_status));
+}
+
+TEST(SSLConnectionStatusTest, SetVersion) {
+ int connection_status = 0xDEADBEEF;
+ int expected_cipher_suite =
+ SSLConnectionStatusToCipherSuite(connection_status);
+
+ SSLConnectionStatusSetVersion(SSL_CONNECTION_VERSION_TLS1_2,
+ &connection_status);
+ EXPECT_EQ(SSL_CONNECTION_VERSION_TLS1_2,
+ SSLConnectionStatusToVersion(connection_status));
+ EXPECT_EQ(expected_cipher_suite,
+ SSLConnectionStatusToCipherSuite(connection_status));
+}
+
+} // namespace
+
+} // namespace net
« no previous file with comments | « net/ssl/ssl_connection_status_flags.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698