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

Issue 2849603003: Use ScopedTaskEnvironment instead of MessageLoopForUI in ui tests. (Closed)

Created:
3 years, 7 months ago by fdoray
Modified:
3 years, 7 months ago
Reviewers:
gab, sadrul
CC:
chromium-reviews, sadrul, Matt Giuca, Peter Beverloo, tfarina, mlamouri+watch-notifications_chromium.org, shuchen+watch_chromium.org, dcheng, nona+watch_chromium.org, awdf+watch_chromium.org, oshima+watch_chromium.org, mac-reviews_chromium.org, kalyank, James Su, yusukes+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use ScopedTaskEnvironment instead of MessageLoopForUI in ui tests. ScopedTaskEnvironment allows usage of ThreadTaskRunnerHandle and base/task_scheduler/post_task.h within its scope. It should be instantiated in everytest 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=sadrul@chromium.org Review-Url: https://codereview.chromium.org/2849603003 Cr-Commit-Position: refs/heads/master@{#467988} Committed: https://chromium.googlesource.com/chromium/src/+/8041ea0d943535dcbb475fe0bf9d0df0c96377ef

Patch Set 1 #

Patch Set 2 : self-review #

Patch Set 3 : self-review #

Patch Set 4 : self-review #

Total comments: 4

Patch Set 5 : CR-add-newline-after-include #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -47 lines) Patch
M ui/app_list/pagination_model_unittest.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M ui/app_list/search/history_data_store_unittest.cc View 1 2 3 4 3 chunks +8 lines, -4 lines 0 comments Download
M ui/aura/mus/os_exchange_data_provider_mus_unittest.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M ui/base/clipboard/clipboard_test_template.h View 1 3 chunks +9 lines, -4 lines 0 comments Download
M ui/base/dragdrop/os_exchange_data_unittest.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M ui/base/ime/chromeos/ime_keyboard_x11_unittest.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M ui/events/gesture_detection/filtered_gesture_provider_unittest.cc View 1 2 chunks +6 lines, -4 lines 1 comment Download
M ui/events/gesture_detection/gesture_provider_unittest.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M ui/events/gestures/gesture_provider_aura_unittest.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M ui/gfx/animation/animation_container_unittest.cc View 1 2 chunks +7 lines, -1 line 0 comments Download
M ui/gfx/animation/animation_unittest.cc View 1 2 2 chunks +8 lines, -1 line 0 comments Download
M ui/gfx/animation/slide_animation_unittest.cc View 1 2 chunks +7 lines, -1 line 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 3 chunks +7 lines, -6 lines 0 comments Download
M ui/message_center/cocoa/popup_collection_unittest.mm View 3 chunks +5 lines, -3 lines 0 comments Download
M ui/views/animation/bounds_animator_unittest.cc View 3 chunks +7 lines, -2 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget_unittest.mm View 1 2 3 2 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 29 (22 generated)
fdoray
3 years, 7 months ago (2017-04-27 18:34:05 UTC) #1
fdoray
gab@: PTAL The change will then be TBRed to the owner.
3 years, 7 months ago (2017-04-27 18:34:08 UTC) #3
gab
lgtm % comments https://codereview.chromium.org/2849603003/diff/60001/ui/app_list/search/history_data_store_unittest.cc File ui/app_list/search/history_data_store_unittest.cc (right): https://codereview.chromium.org/2849603003/diff/60001/ui/app_list/search/history_data_store_unittest.cc#newcode5 ui/app_list/search/history_data_store_unittest.cc:5: #include "ui/app_list/search/history_data_store.h" \n (should fix script) ...
3 years, 7 months ago (2017-04-28 01:33:55 UTC) #19
fdoray
https://codereview.chromium.org/2849603003/diff/60001/ui/app_list/search/history_data_store_unittest.cc File ui/app_list/search/history_data_store_unittest.cc (right): https://codereview.chromium.org/2849603003/diff/60001/ui/app_list/search/history_data_store_unittest.cc#newcode5 ui/app_list/search/history_data_store_unittest.cc:5: #include "ui/app_list/search/history_data_store.h" On 2017/04/28 01:33:54, gab wrote: > \n ...
3 years, 7 months ago (2017-04-28 13:37:39 UTC) #20
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/2849603003/80001
3 years, 7 months ago (2017-04-28 13:38:52 UTC) #25
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/8041ea0d943535dcbb475fe0bf9d0df0c96377ef
3 years, 7 months ago (2017-04-28 14:13:58 UTC) #28
sadrul
3 years, 7 months ago (2017-04-28 15:36:03 UTC) #29
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/2849603003/diff/80001/ui/events/gesture_detec...
File ui/events/gesture_detection/filtered_gesture_provider_unittest.cc (right):

https://codereview.chromium.org/2849603003/diff/80001/ui/events/gesture_detec...
ui/events/gesture_detection/filtered_gesture_provider_unittest.cc:5: #include
"ui/events/gesture_detection/filtered_gesture_provider.h"
newline after

Powered by Google App Engine
This is Rietveld 408576698