OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "cronet_mock_job_interceptor.h" | |
6 | |
7 #include "base/files/file_path.h" | |
8 #include "base/path_service.h" | |
9 #include "base/threading/sequenced_worker_pool.h" | |
10 #include "net/test/url_request/url_request_failed_job.h" | |
11 #include "net/test/url_request/url_request_mock_http_job.h" | |
12 | |
13 namespace cronet { | |
14 | |
15 void AddUrlInterceptors() { | |
16 base::FilePath test_files_root = base::FilePath::FromUTF8Unsafe( | |
17 "/data/data/org.chromium.cronet_test_apk/app_cronet_test"); | |
18 // PathService::Get(base::DIR_ANDROID_APP_DATA, &test_files_root); | |
xunjieli
2014/09/19 20:39:15
Matt, I hardcoded a the directory above temporaril
mmenke
2014/09/19 20:56:37
That's unfortunate. I think the JNI binding appro
| |
19 net::URLRequestMockHTTPJob::AddUrlHandler( | |
20 test_files_root, new base::SequencedWorkerPool(1, "Worker")); | |
21 net::URLRequestFailedJob::AddUrlHandler(); | |
22 } | |
23 | |
24 } // namespace cronet | |
OLD | NEW |