Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(16)

Issue 2798963003: Use ScopedTaskEnvironment instead of MessageLoop in components unit tests. (Closed)

Created:
1 year, 11 months ago by fdoray
Modified:
1 year, 11 months ago
Reviewers:
gab, sdefresne
CC:
chromium-reviews, jdonnelly+watch_chromium.org, vabr+watchlistpasswordmanager_chromium.org, ntp-dev+reviews_chromium.org, rouslan+autofill_chromium.org, rogerm+autofillwatch_chromium.org, sebsg+autofillwatch_chromium.org, browser-components-watch_chromium.org, mathp+autofillwatch_chromium.org, noyau+watch_chromium.org, vabr+watchlistautofill_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org, tbansal+watch-data-reduction-proxy_chromium.org, sync-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use ScopedTaskEnvironment instead of MessageLoop in components unit tests. ScopedTaskEnvironment allows usage of ThreadTaskRunnerHandle and base/task_scheduler/post_task.h within its scope. It should be instantiated in every unit test that uses either of these APIs (i.e. no test should instantiate a MessageLoop directly). Motivation for ScopedTaskEnvironment can be found in: https://docs.google.com/document/d/1QabRo8c7D9LsYY3cEcaPQbOCLo8Tu-6VLykYXyl3Pkk/edit BUG=708584 R=gab@chromium.org TBR=sdefresne@chromium.org Review-Url: https://codereview.chromium.org/2798963003 Cr-Commit-Position: refs/heads/master@{#462510} Committed: https://chromium.googlesource.com/chromium/src/+/0d83127c40b39d0e9a54c1c1a474632017b9fc34

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -28 lines) Patch
M components/autofill/core/browser/autocomplete_history_manager_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/autofill/core/browser/autofill_manager_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/autofill/core/browser/autofill_metrics_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/autofill/core/browser/webdata/autocomplete_sync_bridge_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/browser_sync/profile_sync_service_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/captive_portal/captive_portal_detector_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/display_compositor/yuv_readback_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/google/core/browser/google_url_tracker_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/history/core/browser/history_backend_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/history/core/browser/web_history_service_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/invalidation/impl/gcm_network_channel_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/invalidation/impl/invalidation_notifier_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/nacl/loader/nacl_ipc_adapter_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/ntp_tiles/icon_cacher_impl_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/omnibox/browser/history_quick_provider_performance_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/omnibox/browser/zero_suggest_provider_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/password_manager/core/browser/password_reuse_detection_manager_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/prefs/pref_member_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/suggestions/image_manager_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/sync/base/weak_handle_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/sync/engine_impl/js_mutation_event_observer_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/sync/engine_impl/js_sync_encryption_handler_observer_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/sync/engine_impl/js_sync_manager_observer_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/sync/engine_impl/sync_encryption_handler_impl_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M components/sync/engine_impl/sync_manager_impl_unittest.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M components/sync/js/sync_js_controller_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 13 (7 generated)
fdoray
1 year, 11 months ago (2017-04-05 19:42:38 UTC) #1
fdoray
gab@: PTAL The change will then be TBRed to the owner.
1 year, 11 months ago (2017-04-05 19:42:42 UTC) #3
gab
lgtm
1 year, 11 months ago (2017-04-05 20:54:30 UTC) #5
sdefresne
lgtm
1 year, 11 months ago (2017-04-06 09:24:56 UTC) #8
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/2798963003/1
1 year, 11 months ago (2017-04-06 15:28:19 UTC) #10
commit-bot: I haz the power
1 year, 11 months ago (2017-04-06 16:51:20 UTC) #13
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/0d83127c40b39d0e9a54c1c1a474...

Powered by Google App Engine
This is Rietveld 408576698