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

Side by Side Diff: components/cronet/android/test/cronet_mock_job_interceptor.cc

Issue 558333007: Setup initial mock url request job tests for Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Matt's comments Created 6 years, 3 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 unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698