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

Unified Diff: components/cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java

Issue 1239543003: [Cronet] Surface SSL cert error through CronetURLRequestAdapter::OnSSLCertificateError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test Created 5 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 side-by-side diff with in-line comments
Download patch
Index: components/cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java
diff --git a/components/cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java b/components/cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java
index 325d641c7f59ad818fc4657bc58de8a8d2e62220..70f837bb573f453c771cf4254aaf6f6723dd4be9 100644
--- a/components/cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java
+++ b/components/cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java
@@ -53,10 +53,19 @@ public final class MockUrlRequestJobFactory {
return nativeGetMockUrlForData(data, dataRepeatCount);
}
+ /**
+ * Constructs a mock URL that will fail with an SSL certificate error.
+ */
+ public static String getMockUrlForSSLCertificateError() {
+ return nativeGetMockUrlForSSLCertificateError();
+ }
+
private static native void nativeAddUrlInterceptors();
private static native String nativeGetMockUrlWithFailure(int phase, int netError);
private static native String nativeGetMockUrlForData(String data,
int dataRepeatCount);
+
+ private static native String nativeGetMockUrlForSSLCertificateError();
}

Powered by Google App Engine
This is Rietveld 408576698