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

Side by Side Diff: components/cronet/android/test/javatests/cronet_url_request_context_config_test.cc

Issue 1536433002: [Cronet] Get Cronet performance test running again (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Helen's comments Created 5 years 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
OLDNEW
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"
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "components/cronet/url_request_context_config.h" 13 #include "components/cronet/url_request_context_config.h"
14 #include "jni/CronetUrlRequestContextTest_jni.h" 14 #include "jni/CronetUrlRequestContextTest_jni.h"
15 15
16 namespace cronet { 16 namespace cronet {
17 17
18 // Verifies that all the configuration options set by 18 // Verifies that all the configuration options set by
19 // CronetUrlRequestContextTest.testCronetEngineBuilderConfig 19 // CronetUrlRequestContextTest.testCronetEngineBuilderConfig
20 // made it from the CronetEngine.Builder to the URLRequestContextConfig. 20 // made it from the CronetEngine.Builder to the URLRequestContextConfig.
21 static void VerifyUrlRequestContextConfig( 21 static void VerifyUrlRequestContextConfig(
mef 2015/12/29 17:27:45 I think that if this method did take expected data
pauljensen 2016/01/21 03:51:50 I reverted the moving it to a separate native libr
22 JNIEnv* env, 22 JNIEnv* env,
23 const JavaParamRef<jclass>& jcaller, 23 const JavaParamRef<jclass>& jcaller,
24 jlong jurl_request_context_config, 24 jlong jurl_request_context_config,
25 const JavaParamRef<jstring>& jstorage_path) { 25 const JavaParamRef<jstring>& jstorage_path) {
26 URLRequestContextConfig* config = 26 URLRequestContextConfig* config =
27 reinterpret_cast<URLRequestContextConfig*>(jurl_request_context_config); 27 reinterpret_cast<URLRequestContextConfig*>(jurl_request_context_config);
28 CHECK_EQ(config->enable_spdy, false); 28 CHECK_EQ(config->enable_spdy, false);
29 CHECK_EQ(config->enable_quic, true); 29 CHECK_EQ(config->enable_quic, true);
30 CHECK_EQ(config->enable_sdch, true); 30 CHECK_EQ(config->enable_sdch, true);
31 CHECK_EQ(config->quic_hints.size(), 1u); 31 CHECK_EQ(config->quic_hints.size(), 1u);
(...skipping 11 matching lines...) Expand all
43 CHECK_EQ(config->data_reduction_secure_proxy_check_url, "uvwx"); 43 CHECK_EQ(config->data_reduction_secure_proxy_check_url, "uvwx");
44 CHECK_EQ(config->storage_path, 44 CHECK_EQ(config->storage_path,
45 base::android::ConvertJavaStringToUTF8(env, jstorage_path)); 45 base::android::ConvertJavaStringToUTF8(env, jstorage_path));
46 } 46 }
47 47
48 bool RegisterCronetUrlRequestContextConfigTest(JNIEnv* env) { 48 bool RegisterCronetUrlRequestContextConfigTest(JNIEnv* env) {
49 return RegisterNativesImpl(env); 49 return RegisterNativesImpl(env);
50 } 50 }
51 51
52 } // namespace cronet 52 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698