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

Issue 155941: Make AutomationProxyTest.NavigateToURLWithTimeout* tests not-flaky. (Closed)

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

Description

Make AutomationProxyTest.NavigateToURLWithTimeout* tests not-flaky. I used a mock url request job which is guaranteed to finish after the timeout the test uses. TEST=none http://crbug.com/16462 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21668

Patch Set 1 #

Patch Set 2 : hook up in SetFilteredInet path #

Patch Set 3 : more reliable and improved #

Total comments: 1

Patch Set 4 : better delaying strategy #

Total comments: 1

Patch Set 5 : fixed #

Total comments: 1

Patch Set 6 : maintainability fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -18 lines) Patch
M chrome/browser/automation/automation_provider.cc View 3 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/automation/url_request_mock_http_job.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/automation/url_request_mock_http_job.cc View 2 chunks +24 lines, -16 lines 0 comments Download
A chrome/browser/automation/url_request_slow_http_job.h View 1 2 3 4 1 chunk +41 lines, -0 lines 0 comments Download
A chrome/browser/automation/url_request_slow_http_job.cc View 1 2 3 4 1 chunk +58 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/automation/automation_proxy_uitest.cc View 1 2 3 4 5 3 chunks +16 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Paweł Hajdan Jr.
11 years, 5 months ago (2009-07-22 20:31:31 UTC) #1
huanr
I think you need to add URLRequestSlowHTTPJob to SetFilteredInetTask::Run(). See code path of AutomationProxy::SetFilteredInet() -> ...
11 years, 5 months ago (2009-07-23 04:23:04 UTC) #2
Paweł Hajdan Jr.
On 2009/07/23 04:23:04, huanr wrote: > I think you need to add URLRequestSlowHTTPJob to SetFilteredInetTask::Run(). ...
11 years, 5 months ago (2009-07-23 15:53:26 UTC) #3
huanr
LGTM. Thanks for the change.
11 years, 5 months ago (2009-07-23 19:06:28 UTC) #4
Paweł Hajdan Jr.
It turns out the sleep in this change isn't called. I should have checked that. ...
11 years, 5 months ago (2009-07-24 00:32:12 UTC) #5
huanr
Tony, did you make the original change on UrlRequestMockHttpJob? Can you answer Pawel's question? Huan ...
11 years, 5 months ago (2009-07-24 01:41:37 UTC) #6
tony
If you're going to use the mock requests you need to call automation()->SetFilteredInet(true) which will ...
11 years, 5 months ago (2009-07-24 17:22:42 UTC) #7
Paweł Hajdan Jr.
It seems to have no effect. The request is still not being filtered. And it ...
11 years, 5 months ago (2009-07-24 19:46:16 UTC) #8
Paweł Hajdan Jr.
So, finally made it working as intended. I increased the timeout in the test, so ...
11 years, 5 months ago (2009-07-24 22:01:57 UTC) #9
tony
http://codereview.chromium.org/155941/diff/2006/2010 File chrome/browser/automation/url_request_slow_http_job.cc (right): http://codereview.chromium.org/155941/diff/2006/2010#newcode21 Line 21: PlatformThread::Sleep(kDelayMs); Using a sleep seems scary because it ...
11 years, 5 months ago (2009-07-24 22:15:04 UTC) #10
Paweł Hajdan Jr.
I removed that Sleep. I used a timer, because the method with GetMoreData and ReadRawData ...
11 years, 4 months ago (2009-07-27 17:14:32 UTC) #11
tony
LG if you're able to remove the call to Sleep. http://codereview.chromium.org/155941/diff/2019/1017 File chrome/browser/automation/url_request_slow_http_job.cc (right): http://codereview.chromium.org/155941/diff/2019/1017#newcode24 ...
11 years, 4 months ago (2009-07-27 17:22:13 UTC) #12
huanr
Looks like it is needed to make the job become "slow http". Pawel, to eliminate ...
11 years, 4 months ago (2009-07-27 17:29:47 UTC) #13
Paweł Hajdan Jr.
Oops, I forgot to remove the call to Sleep. Should be good now. I verified ...
11 years, 4 months ago (2009-07-27 17:57:55 UTC) #14
huanr
LGTM. Thanks for the change! http://codereview.chromium.org/155941/diff/2024/1031 File chrome/test/automation/automation_proxy_uitest.cc (right): http://codereview.chromium.org/155941/diff/2024/1031#newcode294 Line 294: 250, &is_timeout); Can ...
11 years, 4 months ago (2009-07-27 18:24:51 UTC) #15
Paweł Hajdan Jr.
On 2009/07/27 18:24:51, huanr wrote: > LGTM. Thanks for the change! > > http://codereview.chromium.org/155941/diff/2024/1031 > ...
11 years, 4 months ago (2009-07-27 18:36:13 UTC) #16
huanr
Certainly a better change. LG
11 years, 4 months ago (2009-07-27 18:45:11 UTC) #17
wtc
11 years, 4 months ago (2009-07-29 00:38:37 UTC) #18
On 2009/07/24 00:32:12, Paweł Hajdan Jr. wrote:
>
> Who is a good person to ask about URLRequestFilter? wtc?

Pawel, do you still have questions about URLRequestFilter.
I am not familiar with that class.  If you have questions,
I can help you understand the code...

Powered by Google App Engine
This is Rietveld 408576698