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

Issue 159614: Undisable half of new ftp unit tests in url_request_unittest.cc. (Closed)

Created:
11 years, 4 months ago by Paweł Hajdan Jr.
Modified:
9 years, 7 months ago
Reviewers:
tony, wtc, ibrar
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Re-enable half of new ftp unit tests in url_request_unittest.cc. This change might introduce flakiness and test hangs, but we have infrastructure in place to quickly detect it. TEST=none http://crbug.com/18036 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=22069

Patch Set 1 #

Total comments: 1

Patch Set 2 : remove garbage from log output #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -34 lines) Patch
M net/ftp/ftp_network_transaction.cc View 1 chunk +1 line, -2 lines 1 comment Download
M net/url_request/url_request_unittest.cc View 1 15 chunks +23 lines, -32 lines 1 comment Download

Messages

Total messages: 6 (0 generated)
Paweł Hajdan Jr.
The tests that are left disabled do not pass EXPECT_FALSE(r.is_pending()) assertion, and they make URLRequestJob ...
11 years, 4 months ago (2009-07-29 23:55:44 UTC) #1
wtc
LGTM! I changed "undisable" to "re-enable". http://codereview.chromium.org/159614/diff/1/2 File net/url_request/url_request_unittest.cc (right): http://codereview.chromium.org/159614/diff/1/2#newcode1861 Line 1861: // Needs ...
11 years, 4 months ago (2009-07-30 00:28:20 UTC) #2
Paweł Hajdan Jr.
I had to make one change in ftp_network_transaction.cc. I couldn't repro it locally, but on ...
11 years, 4 months ago (2009-07-30 16:42:51 UTC) #3
wtc
LGTM. As I noted below, please remove ftp_network_transaction.cc from your CL. http://codereview.chromium.org/159614/diff/1002/6 File net/ftp/ftp_network_transaction.cc (right): ...
11 years, 4 months ago (2009-07-30 18:02:32 UTC) #4
wtc
http://codereview.chromium.org/159614/diff/1002/7 File net/url_request/url_request_unittest.cc (right): http://codereview.chromium.org/159614/diff/1002/7#newcode47 Line 47: class URLRequestTestContext : public URLRequestContext { I found ...
11 years, 4 months ago (2009-07-30 22:16:32 UTC) #5
ibrar
11 years, 4 months ago (2009-07-31 09:19:42 UTC) #6
On 2009/07/30 18:02:32, wtc wrote:
> LGTM.  As I noted below, please remove
> ftp_network_transaction.cc from your CL.
> 
> http://codereview.chromium.org/159614/diff/1002/6
> File net/ftp/ftp_network_transaction.cc (right):
> 
> http://codereview.chromium.org/159614/diff/1002/6#newcode916
> Line 916: DLOG(INFO) << std::string(read_data_buf_->data(), result);
> This should be protected with if (result > 0).
> 
> But in Ibrar's CL http://codereview.chromium.org/146137,
> he removed this DLOG(INFO) statement, so I think you
> should remove this file from your CL, and let Ibrar's CL
> take care of this.
> 
> By the way, I'm also not clear on why the data in the
> read_data_buf_ is null terminated.  Ibrar says it's
> only null terminated if the data is a directory listing.
> But I still don't fully understand it.

Let me clear this again. Actually data is not null terminated string in either
case a file or directory listing "BUT" we need a null terminated string just in
case of directory listing. Because I am treating it as string.

See

"std::istringstream iss(buf->data());" 
in function 

"URLRequestNewFtpJob::ProcessFtpDir"


So I read a byte less than the total buffer and put a "null" in case of
directory listing only.

SEE

"buf->data()[bytes_read] = 0;"

in function

URLRequestNewFtpJob::ProcessFtpDir

Powered by Google App Engine
This is Rietveld 408576698