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 24 matching lines...) Expand all Loading... |
35 CHECK_EQ(config->quic_hints.size(), 1u); | 35 CHECK_EQ(config->quic_hints.size(), 1u); |
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->data_reduction_proxy_key, "abcd"); | |
46 CHECK_EQ(config->user_agent, "efgh"); | 45 CHECK_EQ(config->user_agent, "efgh"); |
47 CHECK_EQ(config->experimental_options, "ijkl"); | 46 CHECK_EQ(config->experimental_options, "ijkl"); |
48 CHECK_EQ(config->data_reduction_primary_proxy, "mnop"); | |
49 CHECK_EQ(config->data_reduction_fallback_proxy, "qrst"); | |
50 CHECK_EQ(config->data_reduction_secure_proxy_check_url, "uvwx"); | |
51 CHECK_EQ(config->storage_path, | 47 CHECK_EQ(config->storage_path, |
52 base::android::ConvertJavaStringToUTF8(env, jstorage_path)); | 48 base::android::ConvertJavaStringToUTF8(env, jstorage_path)); |
53 } | 49 } |
54 | 50 |
55 bool RegisterCronetUrlRequestContextConfigTest(JNIEnv* env) { | 51 bool RegisterCronetUrlRequestContextConfigTest(JNIEnv* env) { |
56 return RegisterNativesImpl(env); | 52 return RegisterNativesImpl(env); |
57 } | 53 } |
58 | 54 |
59 } // namespace cronet | 55 } // namespace cronet |
OLD | NEW |