| OLD | NEW |
| 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 "components/cronet/android/test/cronet_test_util.h" | 5 #include "components/cronet/android/test/cronet_test_util.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "components/cronet/android/cronet_url_request_adapter.h" | 9 #include "components/cronet/android/cronet_url_request_adapter.h" |
| 10 #include "components/cronet/android/cronet_url_request_context_adapter.h" | 10 #include "components/cronet/android/cronet_url_request_context_adapter.h" |
| 11 #include "components/cronet/android/test/native_test_server.h" | 11 #include "components/cronet/android/test/native_test_server.h" |
| 12 #include "components/cronet/android/url_request_context_adapter.h" | 12 #include "components/cronet/android/url_request_context_adapter.h" |
| 13 #include "jni/CronetTestUtil_jni.h" | 13 #include "jni/CronetTestUtil_jni.h" |
| 14 #include "net/dns/host_resolver_impl.h" | 14 #include "net/dns/host_resolver_impl.h" |
| 15 #include "net/dns/mock_host_resolver.h" | 15 #include "net/dns/mock_host_resolver.h" |
| 16 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
| 17 | 17 |
| 18 using base::android::JavaParamRef; |
| 19 |
| 18 namespace cronet { | 20 namespace cronet { |
| 19 | 21 |
| 20 const char kFakeSdchDomain[] = "fake.sdch.domain"; | 22 const char kFakeSdchDomain[] = "fake.sdch.domain"; |
| 21 // This must match the certificate used | 23 // This must match the certificate used |
| 22 // (quic_test.example.com.crt and quic_test.example.com.key.pkcs8), and | 24 // (quic_test.example.com.crt and quic_test.example.com.key.pkcs8), and |
| 23 // the file served ( | 25 // the file served ( |
| 24 // components/cronet/android/test/assets/test/quic_data/simple.txt). | 26 // components/cronet/android/test/assets/test/quic_data/simple.txt). |
| 25 const char kFakeQuicDomain[] = "test.example.com"; | 27 const char kFakeQuicDomain[] = "test.example.com"; |
| 26 | 28 |
| 27 namespace { | 29 namespace { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 return reinterpret_cast<CronetURLRequestAdapter*>(urlRequest) | 89 return reinterpret_cast<CronetURLRequestAdapter*>(urlRequest) |
| 88 ->GetURLRequestForTesting() | 90 ->GetURLRequestForTesting() |
| 89 ->load_flags(); | 91 ->load_flags(); |
| 90 } | 92 } |
| 91 | 93 |
| 92 bool RegisterCronetTestUtil(JNIEnv* env) { | 94 bool RegisterCronetTestUtil(JNIEnv* env) { |
| 93 return RegisterNativesImpl(env); | 95 return RegisterNativesImpl(env); |
| 94 } | 96 } |
| 95 | 97 |
| 96 } // namespace cronet | 98 } // namespace cronet |
| OLD | NEW |