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

Issue 525613002: Set up initial MockURLRequestJob tests for Cronet (Closed)

Created:
6 years, 3 months ago by xunjieli
Modified:
6 years, 3 months ago
Reviewers:
mef, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Set up initial MockURLRequestJob tests for Cronet When we add the new Async APIs, we will need to implement tests for these APIs. MockURLRequestJob is a nice way, as suggested by mmenke, to simulate failed jobs during different stage of url requests. BUG=

Patch Set 1 #

Patch Set 2 : Remove unused variables #

Total comments: 7

Patch Set 3 : Addressed comments #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+360 lines, -26 lines) Patch
M components/cronet.gypi View 1 2 4 chunks +87 lines, -4 lines 0 comments Download
M components/cronet/android/java/src/org/chromium/net/ChromiumUrlRequestFactory.java View 1 chunk +0 lines, -1 line 0 comments Download
A + components/cronet/android/test/AndroidManifest.xml View 1 chunk +4 lines, -4 lines 0 comments Download
A + components/cronet/android/test/cronet_tests_jni.cc View 1 3 chunks +8 lines, -2 lines 2 comments Download
A + components/cronet/android/test/javatests/AndroidManifest.xml View 2 chunks +3 lines, -3 lines 0 comments Download
A components/cronet/android/test/javatests/src/org/chromium/cronet_test_apk/CronetTestBase.java View 1 chunk +34 lines, -0 lines 1 comment Download
A components/cronet/android/test/javatests/src/org/chromium/cronet_test_apk/MockURLRequestJobTest.java View 1 chunk +90 lines, -0 lines 4 comments Download
A components/cronet/android/test/mock_url_request_job.h View 1 chunk +16 lines, -0 lines 0 comments Download
A components/cronet/android/test/mock_url_request_job.cc View 1 chunk +42 lines, -0 lines 1 comment Download
A + components/cronet/android/test/res/layout/cronet_sample_activity.xml View 0 chunks +-1 lines, --1 lines 1 comment Download
A + components/cronet/android/test/res/values/strings.xml View 0 chunks +-1 lines, --1 lines 0 comments Download
A components/cronet/android/test/src/org/chromium/cronet_test_apk/CronetTestActivity.java View 1 1 chunk +49 lines, -0 lines 0 comments Download
A + components/cronet/android/test/src/org/chromium/cronet_test_apk/CronetTestApplication.java View 3 chunks +6 lines, -6 lines 0 comments Download
A components/cronet/android/test/src/org/chromium/cronet_test_apk/URLRequestJobUtil.java View 1 chunk +13 lines, -0 lines 0 comments Download
M net/net.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
A + net/test/url_request_failed_job.h View 3 chunks +5 lines, -5 lines 1 comment Download
A + net/test/url_request_failed_job.cc View 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
xunjieli
Hi Matt and Misha, I just would like a CL that sets things up for ...
6 years, 3 months ago (2014-09-02 13:23:25 UTC) #2
mmenke
On 2014/09/02 13:23:25, xunjieli1 wrote: > Hi Matt and Misha, I just would like a ...
6 years, 3 months ago (2014-09-02 20:49:39 UTC) #3
mef
couple of nits / questions, will have more tomorrow. https://codereview.chromium.org/525613002/diff/20001/components/cronet.gypi File components/cronet.gypi (right): https://codereview.chromium.org/525613002/diff/20001/components/cronet.gypi#newcode340 components/cronet.gypi:340: ...
6 years, 3 months ago (2014-09-02 21:35:55 UTC) #4
xunjieli
https://codereview.chromium.org/525613002/diff/20001/components/cronet.gypi File components/cronet.gypi (right): https://codereview.chromium.org/525613002/diff/20001/components/cronet.gypi#newcode340 components/cronet.gypi:340: On 2014/09/02 21:35:55, mef wrote: > nit: spurious nl. ...
6 years, 3 months ago (2014-09-03 15:04:48 UTC) #5
mmenke
I just skimmed the Java part of this CL. I need to take the time ...
6 years, 3 months ago (2014-09-03 18:02:35 UTC) #6
mef
After this CL we would probably want to move all the tests from cronet_sample into ...
6 years, 3 months ago (2014-09-03 22:03:19 UTC) #7
mef
On 2014/09/03 22:03:19, mef wrote: > After this CL we would probably want to move ...
6 years, 3 months ago (2014-09-03 22:04:04 UTC) #8
mmenke
6 years, 3 months ago (2014-09-03 22:06:00 UTC) #9
On 2014/09/03 22:04:04, mef wrote:
> On 2014/09/03 22:03:19, mef wrote:
> > After this CL we would probably want to move all the tests from
cronet_sample
> > into this, so cronet_sample would be a) simpler and b) proguardable.
> > 
> >
>
https://codereview.chromium.org/525613002/diff/40001/components/cronet/androi...
> > File components/cronet/android/test/res/layout/cronet_sample_activity.xml
> > (right):
> > 
> >
>
https://codereview.chromium.org/525613002/diff/40001/components/cronet/androi...
> > components/cronet/android/test/res/layout/cronet_sample_activity.xml:9:
> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
> > Suggest to rename this to "cronet_test_activity.xml"
> 
> I've created bug 409926 for Async API.

Misha: Just FYI, I talked to Helen about moving the mock URL requests from
content/ to net/.  It's a pretty painful refactoring for mock_url_request_job,
in particular, but we're going to go ahead and do that first.

Powered by Google App Engine
This is Rietveld 408576698