| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "cronet_url_request_context_config_test.h" | 5 #include "cronet_url_request_context_config_test.h" |
| 6 | 6 |
| 7 #include <jni.h> | 7 #include <jni.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 CHECK_EQ((*config->quic_hints.begin())->host, "example.com"); | 36 CHECK_EQ((*config->quic_hints.begin())->host, "example.com"); |
| 37 CHECK_EQ((*config->quic_hints.begin())->port, 12); | 37 CHECK_EQ((*config->quic_hints.begin())->port, 12); |
| 38 CHECK_EQ((*config->quic_hints.begin())->alternate_port, 34); | 38 CHECK_EQ((*config->quic_hints.begin())->alternate_port, 34); |
| 39 CHECK_NE(config->quic_user_agent_id.find("Cronet/" CRONET_VERSION), | 39 CHECK_NE(config->quic_user_agent_id.find("Cronet/" CRONET_VERSION), |
| 40 std::string::npos); | 40 std::string::npos); |
| 41 CHECK_EQ(config->load_disable_cache, false); | 41 CHECK_EQ(config->load_disable_cache, false); |
| 42 CHECK_EQ(config->cert_verifier_data, "test_cert_verifier_data"); | 42 CHECK_EQ(config->cert_verifier_data, "test_cert_verifier_data"); |
| 43 CHECK_EQ(config->http_cache, URLRequestContextConfig::HttpCacheType::MEMORY); | 43 CHECK_EQ(config->http_cache, URLRequestContextConfig::HttpCacheType::MEMORY); |
| 44 CHECK_EQ(config->http_cache_max_size, 54321); | 44 CHECK_EQ(config->http_cache_max_size, 54321); |
| 45 CHECK_EQ(config->user_agent, "efgh"); | 45 CHECK_EQ(config->user_agent, "efgh"); |
| 46 CHECK_EQ(config->experimental_options, "ijkl"); | 46 CHECK(!config->effective_experimental_options); |
| 47 CHECK_EQ(config->storage_path, | 47 CHECK_EQ(config->storage_path, |
| 48 base::android::ConvertJavaStringToUTF8(env, jstorage_path)); | 48 base::android::ConvertJavaStringToUTF8(env, jstorage_path)); |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool RegisterCronetUrlRequestContextConfigTest(JNIEnv* env) { | 51 bool RegisterCronetUrlRequestContextConfigTest(JNIEnv* env) { |
| 52 return RegisterNativesImpl(env); | 52 return RegisterNativesImpl(env); |
| 53 } | 53 } |
| 54 | 54 |
| 55 } // namespace cronet | 55 } // namespace cronet |
| OLD | NEW |