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

Unified Diff: net/cert/cert_verify_proc_unittest.cc

Issue 1903453003: Fix CertVerifyProcTest.PaypalNullCertParsing on iOS SDK 9.3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@{interstitial}
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_proc_unittest.cc
diff --git a/net/cert/cert_verify_proc_unittest.cc b/net/cert/cert_verify_proc_unittest.cc
index 6d01ef65efb963e02cfa727f4de4255770364ff5..abc18519a12a76627b6db96d391fbd1219f750ea 100644
--- a/net/cert/cert_verify_proc_unittest.cc
+++ b/net/cert/cert_verify_proc_unittest.cc
@@ -32,6 +32,8 @@
#include "base/win/windows_version.h"
#elif defined(OS_ANDROID)
#include "base/android/build_info.h"
+#elif defined(OS_IOS)
+#include "base/ios/ios_util.h"
#endif
using base::HexEncode;
@@ -227,9 +229,12 @@ TEST_F(CertVerifyProcTest, PaypalNullCertParsing) {
#if defined(USE_NSS_VERIFIER) || defined(OS_ANDROID)
EXPECT_EQ(ERR_CERT_COMMON_NAME_INVALID, error);
#elif defined(OS_IOS) && TARGET_IPHONE_SIMULATOR
- // iOS returns a ERR_CERT_INVALID error on the simulator, while returning
- // ERR_CERT_AUTHORITY_INVALID on the real device.
- EXPECT_EQ(ERR_CERT_INVALID, error);
+ // iOS returns a ERR_CERT_INVALID error on the simulator until iOS SDK 9.3,
+ // while returning ERR_CERT_AUTHORITY_INVALID on the real device.
+ if (base::ios::IsRunningOnOrLater(9, 3, 0))
+ EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, error);
+ else
+ EXPECT_EQ(ERR_CERT_INVALID, error);
#else
// TOOD(bulach): investigate why macosx and win aren't returning
// ERR_CERT_INVALID or ERR_CERT_COMMON_NAME_INVALID.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698