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

Issue 2635203002: Quit immediately in TestNavigationObserver. (Closed)

Created:
3 years, 11 months ago by Alexander Semashko
Modified:
3 years, 11 months ago
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Quit immediately in TestNavigationObserver. TestNavigationObserver is currently the most often used test helper that employs a MessageLoopRunner with deferred quit. Combined with the calls to the two NavigateToURL* functions, which use it internally (one in ui_test_utils in chrome/ and the other in content_browser_test_utils in content/), there are around 3200 instantiations in the codebase. This CL switches around 40% of them to quit immediately. The remaining part is the calls to ui_test_utils::NavigateToURL. It is left out because there are several problematic cases which I think are better to investigate at once instead of patching with calls to RunAllPendingInMessageLoop, and looks like this is going to be a completely different story. BUG=668707 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2635203002 Cr-Commit-Position: refs/heads/master@{#446045} Committed: https://chromium.googlesource.com/chromium/src/+/c2f9b2a000040b13963a67b6eac0075ec11fa12c

Patch Set 1 #

Patch Set 2 : Use deferred quit in SBNavigationObserverBrowserTest. #

Patch Set 3 : Try to not defer quit in NavigateToURL. #

Patch Set 4 : Revert "Try to not defer quit in NavigateToURL." #

Patch Set 5 : Deduplicate code. #

Total comments: 4

Patch Set 6 : Add comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -30 lines) Patch
M chrome/browser/safe_browsing/safe_browsing_navigation_observer_browsertest.cc View 1 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/base/ui_test_utils.cc View 3 2 chunks +5 lines, -4 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl_browsertest.cc View 1 2 3 4 5 4 chunks +11 lines, -5 lines 0 comments Download
M content/public/test/test_navigation_observer.h View 1 chunk +6 lines, -2 lines 0 comments Download
M content/public/test/test_navigation_observer.cc View 1 2 3 4 1 chunk +8 lines, -17 lines 0 comments Download

Messages

Total messages: 46 (31 generated)
Alexander Semashko
Nasko, please look at changes in content/, or tell me if you're tired of reviewing ...
3 years, 11 months ago (2017-01-19 16:03:30 UTC) #18
Jialiu Lin
On 2017/01/19 16:03:30, Alexander Semashko wrote: > Nasko, please look at changes in content/, or ...
3 years, 11 months ago (2017-01-19 19:51:17 UTC) #21
Alexander Semashko
On 2017/01/19 19:51:17, Jialiu Lin wrote: > On 2017/01/19 16:03:30, Alexander Semashko wrote: > > ...
3 years, 11 months ago (2017-01-19 22:57:47 UTC) #24
Jialiu Lin
On 2017/01/19 22:57:47, Alexander Semashko wrote: > On 2017/01/19 19:51:17, Jialiu Lin wrote: > > ...
3 years, 11 months ago (2017-01-19 23:23:37 UTC) #25
nasko
I'm not tired of these, so definitely keep them coming :). Just a couple of ...
3 years, 11 months ago (2017-01-20 22:54:45 UTC) #26
Alexander Semashko
Re: Jialiu My question was not about TestNavigationObserver, it was about conditions specific for the ...
3 years, 11 months ago (2017-01-23 19:45:39 UTC) #27
Jialiu Lin
On 2017/01/23 19:45:39, Alexander Semashko wrote: > Re: Jialiu > My question was not about ...
3 years, 11 months ago (2017-01-23 19:59:36 UTC) #28
nasko
content/ LGTM
3 years, 11 months ago (2017-01-23 22:35:14 UTC) #29
Jialiu Lin
lgtm
3 years, 11 months ago (2017-01-23 22:47:06 UTC) #30
Alexander Semashko
phajdan.jr@chromium.org: Can you please look at this and stamp for changes in chrome/test/base?
3 years, 11 months ago (2017-01-24 00:34:04 UTC) #32
Paweł Hajdan Jr.
LGTM
3 years, 11 months ago (2017-01-24 11:07:34 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2635203002/100001
3 years, 11 months ago (2017-01-24 11:08:55 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/296828)
3 years, 11 months ago (2017-01-24 11:41:09 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2635203002/100001
3 years, 11 months ago (2017-01-25 13:08:37 UTC) #43
commit-bot: I haz the power
3 years, 11 months ago (2017-01-25 17:14:28 UTC) #46
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/c2f9b2a000040b13963a67b6eac0...

Powered by Google App Engine
This is Rietveld 408576698