| OLD | NEW |
| 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 "ppapi/tests/test_tcp_socket_private_trusted.h" | 5 #include "ppapi/tests/test_tcp_socket_private_trusted.h" |
| 6 | 6 |
| 7 #include "ppapi/cpp/private/tcp_socket_private.h" | 7 #include "ppapi/cpp/private/tcp_socket_private.h" |
| 8 #include "ppapi/cpp/private/x509_certificate_private.h" | 8 #include "ppapi/cpp/private/x509_certificate_private.h" |
| 9 #include "ppapi/tests/testing_instance.h" | 9 #include "ppapi/tests/testing_instance.h" |
| 10 #include "ppapi/tests/test_utils.h" | 10 #include "ppapi/tests/test_utils.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 ASSERT_EQ(PP_OK, cb.result()); | 48 ASSERT_EQ(PP_OK, cb.result()); |
| 49 | 49 |
| 50 cb.WaitForResult( | 50 cb.WaitForResult( |
| 51 socket.SSLHandshake(host_.c_str(), ssl_port_, cb.GetCallback())); | 51 socket.SSLHandshake(host_.c_str(), ssl_port_, cb.GetCallback())); |
| 52 CHECK_CALLBACK_BEHAVIOR(cb); | 52 CHECK_CALLBACK_BEHAVIOR(cb); |
| 53 ASSERT_EQ(PP_OK, cb.result()); | 53 ASSERT_EQ(PP_OK, cb.result()); |
| 54 | 54 |
| 55 const pp::X509CertificatePrivate& cert = socket.GetServerCertificate(); | 55 const pp::X509CertificatePrivate& cert = socket.GetServerCertificate(); |
| 56 ASSERT_EQ( | 56 ASSERT_EQ( |
| 57 cert.GetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_COMMON_NAME).AsString(), | 57 cert.GetField(PP_X509CERTIFICATE_PRIVATE_ISSUER_COMMON_NAME).AsString(), |
| 58 "Test CA"); | 58 "Test Root CA"); |
| 59 ASSERT_EQ( | 59 ASSERT_EQ( |
| 60 cert.GetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_COMMON_NAME).AsString(), | 60 cert.GetField(PP_X509CERTIFICATE_PRIVATE_SUBJECT_COMMON_NAME).AsString(), |
| 61 "127.0.0.1"); | 61 "127.0.0.1"); |
| 62 PASS(); | 62 PASS(); |
| 63 } | 63 } |
| OLD | NEW |