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

Issue 2487073005: Remove direct usage of BrowserThreadImpl in tests (Closed)

Created:
4 years, 1 month ago by gab
Modified:
4 years, 1 month ago
CC:
chromium-reviews, asanka, yusukes+watch_chromium.org, posciak+watch_chromium.org, miu+watch_chromium.org, cbentzel+watch_chromium.org, jam, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, loading-reviews_chromium.org, kalyank, xjz+watch_chromium.org, Randy Smith (Not in Mondays), feature-media-reviews_chromium.org, mcasas+watch+vc_chromium.org, piman+watch_chromium.org, jsbell+idb_chromium.org, michaeln, shuchen+watch_chromium.org, cmumford, danakj+watch_chromium.org, James Su
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove direct usage of BrowserThreadImpl in tests Instantiating a BrowserThreadImpl sets global state which leaks to the next tests. This is a problem in https://codereview.chromium.org/2464233002/ where a reset was introduced for tests (driven by TestBrowserThread). Tests should already have been using TestBrowserThread over BrowserThreadImpl and today TestBrowserThreadBundle is favored over TestBrowserThread so it is used as the replacement in this CL. BUG=653916 Committed: https://crrev.com/606d46cc6d881eb8553c1d7755458913e0e1af73 Cr-Commit-Position: refs/heads/master@{#431070}

Patch Set 1 #

Patch Set 2 : Shutdown ResourceDispatcherImpl in ResourceSchedulerTest before shutting down threads. #

Patch Set 3 : The RDHImpl is actually not even necessary in ResourceSchedulerTest, removed. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -110 lines) Patch
M content/browser/appcache/chrome_appcache_service_unittest.cc View 6 chunks +12 lines, -15 lines 0 comments Download
M content/browser/browser_thread_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/download/base_file_unittest.cc View 3 chunks +3 lines, -8 lines 0 comments Download
M content/browser/download/download_file_unittest.cc View 5 chunks +8 lines, -16 lines 0 comments Download
M content/browser/indexed_db/indexed_db_unittest.cc View 4 chunks +3 lines, -7 lines 0 comments Download
M content/browser/loader/resource_scheduler_unittest.cc View 1 2 3 chunks +3 lines, -10 lines 0 comments Download
M content/browser/media/capture/audio_mirroring_manager_unittest.cc View 3 chunks +6 lines, -7 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_aura_unittest.cc View 4 chunks +6 lines, -7 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc View 3 chunks +2 lines, -10 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager_unittest.cc View 4 chunks +4 lines, -10 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 5 chunks +3 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 3 chunks +4 lines, -7 lines 0 comments Download
M content/browser/resolve_proxy_msg_helper_unittest.cc View 3 chunks +3 lines, -5 lines 0 comments Download
M net/url_request/test_url_fetcher_factory.h View 1 chunk +3 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 30 (18 generated)
gab
Avi PTAL, this is a precursor to https://codereview.chromium.org/2464233002/. TBR pauljensen@ for documentation side-effects in net/url_request/test_url_fetcher_factory.h ...
4 years, 1 month ago (2016-11-09 16:05:13 UTC) #6
pauljensen
net/ lgtm
4 years, 1 month ago (2016-11-09 16:25:00 UTC) #7
Avi (use Gerrit)
Yes, LGTM. Can we do anything to prevent similar code from being written in the ...
4 years, 1 month ago (2016-11-09 17:12:41 UTC) #8
gab
On 2016/11/09 17:12:41, Avi wrote: > Yes, LGTM. Can we do anything to prevent similar ...
4 years, 1 month ago (2016-11-09 19:02:33 UTC) #11
gab
On 2016/11/09 19:02:33, gab wrote: > On 2016/11/09 17:12:41, Avi wrote: > > Yes, LGTM. ...
4 years, 1 month ago (2016-11-09 19:03:56 UTC) #12
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/2487073005/1
4 years, 1 month ago (2016-11-09 19:04:41 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/259390)
4 years, 1 month ago (2016-11-09 20:47:43 UTC) #16
gab
+mmenke, fixing an ASAN error in content/browser/loader in PS1 caused by a missing ResourceDispatcherHostImpl::Shutdown() call ...
4 years, 1 month ago (2016-11-09 21:13:27 UTC) #19
mmenke
On 2016/11/09 21:13:27, gab wrote: > +mmenke, fixing an ASAN error in content/browser/loader in PS1 ...
4 years, 1 month ago (2016-11-09 21:36:13 UTC) #23
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/2487073005/60001
4 years, 1 month ago (2016-11-09 21:37:15 UTC) #26
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 1 month ago (2016-11-09 23:07:50 UTC) #28
commit-bot: I haz the power
4 years, 1 month ago (2016-11-09 23:15:56 UTC) #30
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/606d46cc6d881eb8553c1d7755458913e0e1af73
Cr-Commit-Position: refs/heads/master@{#431070}

Powered by Google App Engine
This is Rietveld 408576698