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

Unified Diff: components/cronet/android/test/native_test_server.cc

Issue 1389213003: [Cronet] Use Https for Quic Test Server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ryancl
Patch Set: Address Misha's comments Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/cronet/android/test/native_test_server.cc
diff --git a/components/cronet/android/test/native_test_server.cc b/components/cronet/android/test/native_test_server.cc
index 5c8c6d4b8547c5c2ec887e1e07a8a3639ee3699c..008fd5d764add37635231679900f7abc1eb82412 100644
--- a/components/cronet/android/test/native_test_server.cc
+++ b/components/cronet/android/test/native_test_server.cc
@@ -40,6 +40,11 @@ const char kEchoAllHeadersPath[] = "/echo_all_headers";
const char kEchoMethodPath[] = "/echo_method";
const char kRedirectToEchoBodyPath[] = "/redirect_to_echo_body";
const char kFakeSdchDomain[] = "fake.sdch.domain";
+// Host used in QuicTestServer. This must match the certificate used
+// (quic_test.example.com.crt and quic_test.example.com.key.pkcs8), and
+// the file served (
+// components/cronet/android/test/assets/test/quic_data/simple.txt).
+const char kFakeQuicDomain[] = "test.example.com";
// Path that advertises the dictionary passed in query params if client
// supports Sdch encoding. E.g. /sdch/index?q=LeQxM80O will make the server
// responds with "Get-Dictionary: /sdch/dict/LeQxM80O".
@@ -190,6 +195,7 @@ void RegisterHostResolverProcHelper(
scoped_refptr<net::RuleBasedHostResolverProc> proc =
new net::RuleBasedHostResolverProc(NULL);
proc->AddRule(kFakeSdchDomain, "127.0.0.1");
+ proc->AddRule(kFakeQuicDomain, "127.0.0.1");
resolver->set_proc_params_for_test(
net::HostResolverImpl::ProcTaskParams(proc.get(), 1u));
JNIEnv* env = base::android::AttachCurrentThread();
« no previous file with comments | « components/cronet/android/test/mock_cert_verifier.cc ('k') | components/cronet/android/test/quic_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698