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

Side by Side 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: Add include 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 unified diff | Download patch
« no previous file with comments | « components/cronet/android/test/mock_url_request_job_factory.cc ('k') | net/net.gyp » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 package org.chromium.net; 5 package org.chromium.net;
6 6
7 import static junit.framework.Assert.assertTrue; 7 import static junit.framework.Assert.assertTrue;
8 8
9 import org.chromium.base.JNINamespace; 9 import org.chromium.base.JNINamespace;
10 import org.chromium.net.test.FailurePhase; 10 import org.chromium.net.test.FailurePhase;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 * Constructs a mock URL that synchronously responds with data repeated many 46 * Constructs a mock URL that synchronously responds with data repeated many
47 * times. 47 * times.
48 * 48 *
49 * @param data to return in response. 49 * @param data to return in response.
50 * @param dataRepeatCount number of times to repeat the data. 50 * @param dataRepeatCount number of times to repeat the data.
51 */ 51 */
52 public static String getMockUrlForData(String data, int dataRepeatCount) { 52 public static String getMockUrlForData(String data, int dataRepeatCount) {
53 return nativeGetMockUrlForData(data, dataRepeatCount); 53 return nativeGetMockUrlForData(data, dataRepeatCount);
54 } 54 }
55 55
56 /**
57 * Constructs a mock URL that will fail with an SSL certificate error.
58 */
59 public static String getMockUrlForSSLCertificateError() {
60 return nativeGetMockUrlForSSLCertificateError();
61 }
62
56 private static native void nativeAddUrlInterceptors(); 63 private static native void nativeAddUrlInterceptors();
57 64
58 private static native String nativeGetMockUrlWithFailure(int phase, int netE rror); 65 private static native String nativeGetMockUrlWithFailure(int phase, int netE rror);
59 66
60 private static native String nativeGetMockUrlForData(String data, 67 private static native String nativeGetMockUrlForData(String data,
61 int dataRepeatCount); 68 int dataRepeatCount);
69
70 private static native String nativeGetMockUrlForSSLCertificateError();
62 } 71 }
OLDNEW
« no previous file with comments | « components/cronet/android/test/mock_url_request_job_factory.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698