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_x509_certificate_private.h" | 5 #include "ppapi/tests/test_x509_certificate_private.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include <cmath> | 9 #include <cmath> |
8 #include <limits> | 10 #include <limits> |
9 | 11 |
10 #include "ppapi/cpp/private/x509_certificate_private.h" | 12 #include "ppapi/cpp/private/x509_certificate_private.h" |
| 13 #include "ppapi/cpp/var.h" |
11 #include "ppapi/cpp/var_array_buffer.h" | 14 #include "ppapi/cpp/var_array_buffer.h" |
12 #include "ppapi/cpp/var.h" | |
13 #include "ppapi/tests/testing_instance.h" | 15 #include "ppapi/tests/testing_instance.h" |
14 | 16 |
15 REGISTER_TEST_CASE(X509CertificatePrivate); | 17 REGISTER_TEST_CASE(X509CertificatePrivate); |
16 | 18 |
17 namespace { | 19 namespace { |
18 | 20 |
19 bool FieldMatchesString( | 21 bool FieldMatchesString( |
20 const pp::X509CertificatePrivate& certificate, | 22 const pp::X509CertificatePrivate& certificate, |
21 PP_X509Certificate_Private_Field field, | 23 PP_X509Certificate_Private_Field field, |
22 const std::string& expected) { | 24 const std::string& expected) { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 pp::X509CertificatePrivate null_certificate(instance_); | 229 pp::X509CertificatePrivate null_certificate(instance_); |
228 successful = null_certificate.Initialize(NULL, 0); | 230 successful = null_certificate.Initialize(NULL, 0); |
229 ASSERT_FALSE(successful); | 231 ASSERT_FALSE(successful); |
230 | 232 |
231 pp::X509CertificatePrivate bad_certificate(instance_); | 233 pp::X509CertificatePrivate bad_certificate(instance_); |
232 successful = bad_certificate.Initialize("acbde", 0); | 234 successful = bad_certificate.Initialize("acbde", 0); |
233 ASSERT_FALSE(successful); | 235 ASSERT_FALSE(successful); |
234 | 236 |
235 PASS(); | 237 PASS(); |
236 } | 238 } |
OLD | NEW |