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

Side by Side Diff: ppapi/tests/test_tcp_socket_private_trusted.cc

Issue 5535006: Add unittests for net::TestRootCerts and regenerate test certificates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix another hardcoded string Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « net/test/spawned_test_server/base_test_server.cc ('k') | tools/python/google/httpd_config/httpd2.pem » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698