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

Side by Side Diff: net/cert/internal/parse_ocsp_unittest.cc

Issue 2148303002: Initialize memory in encode_values_unittest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove drmemory suppression. Created 4 years, 5 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
« no previous file with comments | « net/cert/internal/parse_ocsp.h ('k') | net/der/encode_values.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "net/cert/internal/parse_ocsp.h" 5 #include "net/cert/internal/parse_ocsp.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "net/cert/internal/test_helpers.h" 9 #include "net/cert/internal/test_helpers.h"
10 #include "net/cert/x509_certificate.h" 10 #include "net/cert/x509_certificate.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 TEST(OCSPDateTest, VerifyTimeMinusAgeFromBeforeWindowsEpoch) { 299 TEST(OCSPDateTest, VerifyTimeMinusAgeFromBeforeWindowsEpoch) {
300 OCSPSingleResponse response; 300 OCSPSingleResponse response;
301 base::Time windows_epoch; 301 base::Time windows_epoch;
302 base::Time verify_time = windows_epoch + base::TimeDelta::FromDays(1); 302 base::Time verify_time = windows_epoch + base::TimeDelta::FromDays(1);
303 303
304 base::Time this_update = windows_epoch; 304 base::Time this_update = windows_epoch;
305 ASSERT_TRUE( 305 ASSERT_TRUE(
306 der::EncodeTimeAsGeneralizedTime(this_update, &response.this_update)); 306 der::EncodeTimeAsGeneralizedTime(this_update, &response.this_update));
307 response.has_next_update = false; 307 response.has_next_update = false;
308 #ifdef OS_WIN 308 #if defined(OS_WIN)
309 EXPECT_FALSE(CheckOCSPDateValid(response, verify_time, kOCSPAgeOneWeek)); 309 EXPECT_FALSE(CheckOCSPDateValid(response, verify_time, kOCSPAgeOneWeek));
310 #else 310 #else
311 EXPECT_TRUE(CheckOCSPDateValid(response, verify_time, kOCSPAgeOneWeek)); 311 EXPECT_TRUE(CheckOCSPDateValid(response, verify_time, kOCSPAgeOneWeek));
312 #endif 312 #endif
313 } 313 }
314 314
315 } // namespace net 315 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/internal/parse_ocsp.h ('k') | net/der/encode_values.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698