summaryrefslogtreecommitdiffstats
path: root/net/base/ssl_cipher_suite_names_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/base/ssl_cipher_suite_names_unittest.cc')
-rw-r--r--net/base/ssl_cipher_suite_names_unittest.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/net/base/ssl_cipher_suite_names_unittest.cc b/net/base/ssl_cipher_suite_names_unittest.cc
new file mode 100644
index 0000000..3a9c2ee
--- /dev/null
+++ b/net/base/ssl_cipher_suite_names_unittest.cc
@@ -0,0 +1,27 @@
+// Copyright (c) 2010 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/base/ssl_cipher_suite_names.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace net {
+
+namespace {
+
+TEST(CipherSuiteNamesTest, Basic) {
+ const char *key_exchange, *cipher, *mac;
+ SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, 0xc001);
+ EXPECT_STREQ(key_exchange, "ECDH_ECDSA");
+ EXPECT_STREQ(cipher, "NULL");
+ EXPECT_STREQ(mac, "SHA1");
+
+ SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, 0xff31);
+ EXPECT_STREQ(key_exchange, "???");
+ EXPECT_STREQ(cipher, "???");
+ EXPECT_STREQ(mac, "???");
+}
+
+} // anonymous namespace
+
+} // namespace net