summaryrefslogtreecommitdiffstats
path: root/net/base/x509_certificate_unittest.cc
diff options
context:
space:
mode:
authoravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-22 14:48:39 +0000
committeravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-22 14:48:39 +0000
commit9bbb0b88f274f767358644dd97b1ee0c9604010b (patch)
tree7fc08817df3ebcfbbb1426a48cee714ed43cd747 /net/base/x509_certificate_unittest.cc
parent5da98afcd7ce538f44d4123b63d14eb6110f57d8 (diff)
downloadchromium_src-9bbb0b88f274f767358644dd97b1ee0c9604010b.zip
chromium_src-9bbb0b88f274f767358644dd97b1ee0c9604010b.tar.gz
chromium_src-9bbb0b88f274f767358644dd97b1ee0c9604010b.tar.bz2
Unit test now runs on the Mac.
Review URL: http://codereview.chromium.org/3000 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_certificate_unittest.cc')
-rw-r--r--net/base/x509_certificate_unittest.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/base/x509_certificate_unittest.cc b/net/base/x509_certificate_unittest.cc
index d9f31b7..4a61562 100644
--- a/net/base/x509_certificate_unittest.cc
+++ b/net/base/x509_certificate_unittest.cc
@@ -97,7 +97,7 @@ unsigned char google_fingerprint[] = {
using net::X509Certificate;
-TEST(X509CertificateTest, BasicParsing) {
+TEST(X509CertificateTest, GoogleCertParsing) {
X509Certificate *google_cert = X509Certificate::CreateFromBytes(
reinterpret_cast<const char*>(google_der), sizeof(google_der));
@@ -125,11 +125,12 @@ TEST(X509CertificateTest, BasicParsing) {
EXPECT_EQ(0U, issuer.organization_unit_names.size());
EXPECT_EQ(0U, issuer.domain_components.size());
+ // Use DoubleT because its epoch is the same on all platforms
const Time& valid_start = google_cert->valid_start();
- EXPECT_EQ(GG_LONGLONG(12854221375000000), valid_start.ToInternalValue());
+ EXPECT_EQ(1209747775, valid_start.ToDoubleT());
const Time& valid_expiry = google_cert->valid_expiry();
- EXPECT_EQ(GG_LONGLONG(12885757375000000), valid_expiry.ToInternalValue());
+ EXPECT_EQ(1241283775, valid_expiry.ToDoubleT());
const X509Certificate::Fingerprint& fingerprint = google_cert->fingerprint();
for (size_t i = 0; i < 20; ++i)