New issue
Advanced search Search tips
Starred by 6 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Sign in to add a comment
link

Issue 708584: Create base::test::ScopedTaskEnvironment.

Reported by fdoray@chromium.org, Apr 5 2017 Project Member

Issue description

Showing comments 12 - 111 of 111 Older

Comment 12 by bugdroid1@chromium.org, Apr 6 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4cf067df249b8dbf265eeb944ed7c9b0ef420b08

commit 4cf067df249b8dbf265eeb944ed7c9b0ef420b08
Author: fdoray <fdoray@chromium.org>
Date: Thu Apr 06 16:48:15 2017

Use ScopedTaskEnvironment instead of MessageLoop in media 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=liberato@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2801823002
Cr-Commit-Position: refs/heads/master@{#462509}

[modify] https://crrev.com/4cf067df249b8dbf265eeb944ed7c9b0ef420b08/media/base/audio_renderer_mixer_input_unittest.cc
[modify] https://crrev.com/4cf067df249b8dbf265eeb944ed7c9b0ef420b08/media/base/media_url_demuxer_unittest.cc
[modify] https://crrev.com/4cf067df249b8dbf265eeb944ed7c9b0ef420b08/media/cdm/aes_decryptor_unittest.cc
[modify] https://crrev.com/4cf067df249b8dbf265eeb944ed7c9b0ef420b08/media/cdm/cdm_adapter_unittest.cc
[modify] https://crrev.com/4cf067df249b8dbf265eeb944ed7c9b0ef420b08/media/gpu/android/media_codec_video_decoder_unittest.cc
[modify] https://crrev.com/4cf067df249b8dbf265eeb944ed7c9b0ef420b08/media/gpu/ipc/service/gpu_jpeg_decode_accelerator_unittest.cc
[modify] https://crrev.com/4cf067df249b8dbf265eeb944ed7c9b0ef420b08/media/remoting/courier_renderer_unittest.cc

Comment 13 by bugdroid1@chromium.org, Apr 6 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0d83127c40b39d0e9a54c1c1a474632017b9fc34

commit 0d83127c40b39d0e9a54c1c1a474632017b9fc34
Author: fdoray <fdoray@chromium.org>
Date: Thu Apr 06 16:50:19 2017

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}

[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/autofill/core/browser/autocomplete_history_manager_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/autofill/core/browser/autofill_manager_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/autofill/core/browser/autofill_metrics_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/autofill/core/browser/webdata/autocomplete_sync_bridge_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/browser_sync/profile_sync_service_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/captive_portal/captive_portal_detector_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/display_compositor/yuv_readback_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/google/core/browser/google_url_tracker_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/history/core/browser/history_backend_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/history/core/browser/web_history_service_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/invalidation/impl/gcm_network_channel_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/invalidation/impl/invalidation_notifier_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/nacl/loader/nacl_ipc_adapter_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/ntp_tiles/icon_cacher_impl_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/omnibox/browser/history_quick_provider_performance_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/omnibox/browser/zero_suggest_provider_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/password_manager/core/browser/password_reuse_detection_manager_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/prefs/pref_member_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/suggestions/image_manager_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/sync/base/weak_handle_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/sync/engine_impl/js_mutation_event_observer_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/sync/engine_impl/js_sync_encryption_handler_observer_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/sync/engine_impl/js_sync_manager_observer_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/sync/engine_impl/sync_encryption_handler_impl_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/sync/engine_impl/sync_manager_impl_unittest.cc
[modify] https://crrev.com/0d83127c40b39d0e9a54c1c1a474632017b9fc34/components/sync/js/sync_js_controller_unittest.cc

Comment 14 by bugdroid1@chromium.org, Apr 6 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/320ae6a39b8d1d36cf65b82750942d957a029599

commit 320ae6a39b8d1d36cf65b82750942d957a029599
Author: fdoray <fdoray@chromium.org>
Date: Thu Apr 06 17:15:38 2017

Revert of Use ScopedTaskEnvironment instead of MessageLoop in chrome unit tests. (patchset #1 id:1 of https://codereview.chromium.org/2797293002/ )

Reason for revert:
Test timeout in MutableProfileOAuth2TokenServiceDelegateTest.ShutdownService

Original issue's description:
> Use ScopedTaskEnvironment instead of MessageLoop in chrome 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=sky@chromium.org, vitalybuka@chromium.org
>
> Review-Url: https://codereview.chromium.org/2797293002
> Cr-Commit-Position: refs/heads/master@{#462492}
> Committed: https://chromium.googlesource.com/chromium/src/+/0bc320f205ad411a7ab935fa79879ff75e8a7fc9

TBR=gab@chromium.org,sky@chromium.org,vitalybuka@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=708584

Review-Url: https://codereview.chromium.org/2799743004
Cr-Commit-Position: refs/heads/master@{#462521}

[modify] https://crrev.com/320ae6a39b8d1d36cf65b82750942d957a029599/chrome/browser/chromeos/net/network_state_notifier_unittest.cc
[modify] https://crrev.com/320ae6a39b8d1d36cf65b82750942d957a029599/chrome/browser/local_discovery/local_domain_resolver_unittest.cc
[modify] https://crrev.com/320ae6a39b8d1d36cf65b82750942d957a029599/chrome/browser/printing/cloud_print/privet_notifications_unittest.cc
[modify] https://crrev.com/320ae6a39b8d1d36cf65b82750942d957a029599/chrome/browser/process_singleton_posix_unittest.cc
[modify] https://crrev.com/320ae6a39b8d1d36cf65b82750942d957a029599/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc
[modify] https://crrev.com/320ae6a39b8d1d36cf65b82750942d957a029599/chrome/browser/ui/desktop_ios_promotion/sms_service_unittest.cc
[modify] https://crrev.com/320ae6a39b8d1d36cf65b82750942d957a029599/chrome/utility/image_writer/image_writer_unittest.cc

Comment 15 by bugdroid1@chromium.org, Apr 6 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/86573e43dc92125878dcafc820c5dce12876317e

commit 86573e43dc92125878dcafc820c5dce12876317e
Author: fdoray <fdoray@chromium.org>
Date: Thu Apr 06 17:26:36 2017

Use ScopedTaskEnvironment instead of MessageLoop in content 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=michaeln@chromium.org, aelias@chromium.org, yfriedman@chromium.org

Review-Url: https://codereview.chromium.org/2800893002
Cr-Commit-Position: refs/heads/master@{#462528}

[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/android/url_request_content_job_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/appcache/appcache_quota_client_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/appcache/appcache_service_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/appcache/mock_appcache_storage_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/fileapi/copy_or_move_file_validator_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/fileapi/file_system_context_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/fileapi/file_system_operation_runner_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/fileapi/file_system_quota_client_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/fileapi/local_file_util_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/fileapi/recursive_operation_delegate_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/fileapi/sandbox_file_system_backend_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/fileapi/transient_file_util_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/quota/mock_quota_manager_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/quota/quota_manager_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/quota/quota_temporary_storage_evictor_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/quota/usage_tracker_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/browser/renderer_host/pepper/quota_reservation_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/child/indexed_db/webidbcursor_impl_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/renderer/gpu/queue_message_swap_promise_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/renderer/input/input_event_filter_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/renderer/media/android/stream_texture_wrapper_impl_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/renderer/media_capture_from_element/html_audio_element_capturer_source_unittest.cc
[modify] https://crrev.com/86573e43dc92125878dcafc820c5dce12876317e/content/renderer/media_recorder/audio_track_recorder_unittest.cc

Comment 16 by gab@chromium.org, Apr 11 2017

Blockedon: 703346

Comment 17 by bugdroid1@chromium.org, Apr 13 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6044a51d3e0eff211412224d21f62777db7641a4

commit 6044a51d3e0eff211412224d21f62777db7641a4
Author: fdoray <fdoray@chromium.org>
Date: Thu Apr 13 12:04:20 2017

Flush TaskScheduler in ~ScopedTaskEnvironment and ~ScopedAsyncTaskScheduler.

Skipping tasks when destroying ScopedTaskEnvironment or
ScopedAsyncTaskScheduler means that DeleteSoon() tasks
can be skipped, resulting in memory leaks.

BUG=708584,  709095 

Review-Url: https://codereview.chromium.org/2812293002
Cr-Commit-Position: refs/heads/master@{#464380}

[modify] https://crrev.com/6044a51d3e0eff211412224d21f62777db7641a4/base/test/scoped_async_task_scheduler.cc
[modify] https://crrev.com/6044a51d3e0eff211412224d21f62777db7641a4/base/test/scoped_task_environment.cc

Comment 18 by bugdroid1@chromium.org, Apr 26 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8744ec289206bffe0393619be6bef8322301b169

commit 8744ec289206bffe0393619be6bef8322301b169
Author: fdoray <fdoray@chromium.org>
Date: Wed Apr 26 20:23:25 2017

Allow ScopedTaskEnvironment to pump UI or IO messages on the main thread.

This change will allow tests that require a main thread that
pumps UI or IO messages to be migrated to ScopedTaskEnvironment.

BUG=708584

Review-Url: https://codereview.chromium.org/2836963002
Cr-Commit-Position: refs/heads/master@{#467436}

[modify] https://crrev.com/8744ec289206bffe0393619be6bef8322301b169/base/test/scoped_task_environment.cc
[modify] https://crrev.com/8744ec289206bffe0393619be6bef8322301b169/base/test/scoped_task_environment.h

Comment 19 by bugdroid1@chromium.org, Apr 27 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/27ff7475715673ebc736e4b198c3e90696d83022

commit 27ff7475715673ebc736e4b198c3e90696d83022
Author: fdoray <fdoray@chromium.org>
Date: Thu Apr 27 19:41:15 2017

Use ScopedTaskEnvironment instead of MessageLoopForUI in device 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=reillyg@chromium.org

Review-Url: https://codereview.chromium.org/2849613002
Cr-Commit-Position: refs/heads/master@{#467760}

[modify] https://crrev.com/27ff7475715673ebc736e4b198c3e90696d83022/device/geolocation/geolocation_provider_impl_unittest.cc
[modify] https://crrev.com/27ff7475715673ebc736e4b198c3e90696d83022/device/geolocation/wifi_data_provider_chromeos_unittest.cc
[modify] https://crrev.com/27ff7475715673ebc736e4b198c3e90696d83022/device/geolocation/wifi_data_provider_common_unittest.cc
[modify] https://crrev.com/27ff7475715673ebc736e4b198c3e90696d83022/device/geolocation/wifi_data_provider_linux_unittest.cc
[modify] https://crrev.com/27ff7475715673ebc736e4b198c3e90696d83022/device/u2f/u2f_register_unittest.cc
[modify] https://crrev.com/27ff7475715673ebc736e4b198c3e90696d83022/device/u2f/u2f_request_unittest.cc
[modify] https://crrev.com/27ff7475715673ebc736e4b198c3e90696d83022/device/u2f/u2f_sign_unittest.cc

Comment 20 by bugdroid1@chromium.org, Apr 27 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/822e6b2520c585093f6fa163b7475bd4dc77dfac

commit 822e6b2520c585093f6fa163b7475bd4dc77dfac
Author: fdoray <fdoray@chromium.org>
Date: Thu Apr 27 20:47:03 2017

Use ScopedTaskEnvironment instead of MessageLoopForUI in chromeos 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=stevenjb@chromium.org

Review-Url: https://codereview.chromium.org/2845973003
Cr-Commit-Position: refs/heads/master@{#467781}

[modify] https://crrev.com/822e6b2520c585093f6fa163b7475bd4dc77dfac/chromeos/audio/cras_audio_handler_unittest.cc
[modify] https://crrev.com/822e6b2520c585093f6fa163b7475bd4dc77dfac/chromeos/cryptohome/system_salt_getter_unittest.cc
[modify] https://crrev.com/822e6b2520c585093f6fa163b7475bd4dc77dfac/chromeos/network/firewall_hole_unittest.cc
[modify] https://crrev.com/822e6b2520c585093f6fa163b7475bd4dc77dfac/chromeos/network/geolocation_handler_unittest.cc
[modify] https://crrev.com/822e6b2520c585093f6fa163b7475bd4dc77dfac/chromeos/network/network_device_handler_unittest.cc
[modify] https://crrev.com/822e6b2520c585093f6fa163b7475bd4dc77dfac/chromeos/network/network_sms_handler_unittest.cc
[modify] https://crrev.com/822e6b2520c585093f6fa163b7475bd4dc77dfac/chromeos/network/network_state_handler_unittest.cc
[modify] https://crrev.com/822e6b2520c585093f6fa163b7475bd4dc77dfac/chromeos/network/prohibited_technologies_handler_unittest.cc
[modify] https://crrev.com/822e6b2520c585093f6fa163b7475bd4dc77dfac/chromeos/network/shill_property_handler_unittest.cc

Comment 21 by bugdroid1@chromium.org, Apr 28 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bc23556815ace00e5f26b5e3d63d07cf8eafabd9

commit bc23556815ace00e5f26b5e3d63d07cf8eafabd9
Author: fdoray <fdoray@chromium.org>
Date: Fri Apr 28 12:36:39 2017

Use ScopedTaskEnvironment instead of MessageLoopForUI in ios 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=marq@chromium.org

Review-Url: https://codereview.chromium.org/2846073002
Cr-Commit-Position: refs/heads/master@{#467968}

[modify] https://crrev.com/bc23556815ace00e5f26b5e3d63d07cf8eafabd9/ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller_unittest.mm
[modify] https://crrev.com/bc23556815ace00e5f26b5e3d63d07cf8eafabd9/ios/chrome/browser/ui/settings/translate_collection_view_controller_unittest.mm
[modify] https://crrev.com/bc23556815ace00e5f26b5e3d63d07cf8eafabd9/ios/chrome/browser/ui/settings/voicesearch_collection_view_controller_unittest.mm
[modify] https://crrev.com/bc23556815ace00e5f26b5e3d63d07cf8eafabd9/ios/web/webui/url_fetcher_block_adapter_unittest.mm

Comment 22 by bugdroid1@chromium.org, Apr 28 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/40b0d9cabbed3a1447f51af3ffc5a287e86f9390

commit 40b0d9cabbed3a1447f51af3ffc5a287e86f9390
Author: fdoray <fdoray@chromium.org>
Date: Fri Apr 28 14:12:35 2017

Use ScopedTaskEnvironment instead of MessageLoopForUI in ash 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=sky@chromium.org

Review-Url: https://codereview.chromium.org/2846723004
Cr-Commit-Position: refs/heads/master@{#467987}

[modify] https://crrev.com/40b0d9cabbed3a1447f51af3ffc5a287e86f9390/ash/system/power/power_status_unittest.cc
[modify] https://crrev.com/40b0d9cabbed3a1447f51af3ffc5a287e86f9390/ash/test/ash_test_environment_default.cc

Comment 23 by bugdroid1@chromium.org, Apr 28 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8041ea0d943535dcbb475fe0bf9d0df0c96377ef

commit 8041ea0d943535dcbb475fe0bf9d0df0c96377ef
Author: fdoray <fdoray@chromium.org>
Date: Fri Apr 28 14:13:36 2017

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}

[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/app_list/pagination_model_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/app_list/search/history_data_store_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/aura/mus/os_exchange_data_provider_mus_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/base/clipboard/clipboard_test_template.h
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/base/dragdrop/os_exchange_data_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/base/ime/chromeos/ime_keyboard_x11_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/events/gesture_detection/filtered_gesture_provider_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/events/gesture_detection/gesture_provider_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/events/gestures/gesture_provider_aura_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/gfx/animation/animation_container_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/gfx/animation/animation_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/gfx/animation/slide_animation_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/gfx/render_text_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/message_center/cocoa/popup_collection_unittest.mm
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/views/animation/bounds_animator_unittest.cc
[modify] https://crrev.com/8041ea0d943535dcbb475fe0bf9d0df0c96377ef/ui/views/cocoa/bridged_native_widget_unittest.mm

Comment 24 by bugdroid1@chromium.org, Apr 28 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/638b48e2f217dd8fe276e91906d7c3a6f6506eac

commit 638b48e2f217dd8fe276e91906d7c3a6f6506eac
Author: fdoray <fdoray@chromium.org>
Date: Fri Apr 28 16:10:43 2017

Use ScopedTaskEnvironment instead of MessageLoopForUI in remoting 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=garykac@chromium.org

Review-Url: https://codereview.chromium.org/2846943002
Cr-Commit-Position: refs/heads/master@{#468018}

[modify] https://crrev.com/638b48e2f217dd8fe276e91906d7c3a6f6506eac/remoting/test/BUILD.gn
[modify] https://crrev.com/638b48e2f217dd8fe276e91906d7c3a6f6506eac/remoting/test/it2me_standalone_host.cc
[modify] https://crrev.com/638b48e2f217dd8fe276e91906d7c3a6f6506eac/remoting/test/it2me_standalone_host.h

Comment 25 by bugdroid1@chromium.org, May 1 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/66a9a083d5158d54b7db7aecd60175fb96e6dc0b

commit 66a9a083d5158d54b7db7aecd60175fb96e6dc0b
Author: fdoray <fdoray@chromium.org>
Date: Mon May 01 18:31:27 2017

Use ScopedTaskEnvironment instead of MessageLoopForUI in components 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=sdefresne@chromium.org

Review-Url: https://codereview.chromium.org/2846723005
Cr-Commit-Position: refs/heads/master@{#468361}

[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/arc/arc_session_runner_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/autofill/core/browser/webdata/web_data_service_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/bookmarks/browser/BUILD.gn
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/bookmarks/browser/bookmark_node_data_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/bookmarks/browser/bookmark_utils_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/component_updater/timer_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/favicon/core/favicon_handler_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/gcm_driver/instance_id/instance_id_driver_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/history/core/browser/history_service_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/history/core/test/BUILD.gn
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/history/core/test/history_backend_db_base_test.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/history/core/test/history_backend_db_base_test.h
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/password_manager/core/browser/password_store_default_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/password_manager/core/browser/password_store_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/policy/core/common/cloud/user_cloud_policy_store_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/precache/core/precache_database_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/precache/core/precache_fetcher_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/rappor/log_uploader_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/sync/device_info/device_info_data_type_controller_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/sync/driver/async_directory_type_controller_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/sync/driver/generic_change_processor_unittest.cc
[modify] https://crrev.com/66a9a083d5158d54b7db7aecd60175fb96e6dc0b/components/sync_sessions/favicon_cache_unittest.cc

Comment 26 by bugdroid1@chromium.org, May 1 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8f9f016285a1178e63e8676ecc950db84a92cc65

commit 8f9f016285a1178e63e8676ecc950db84a92cc65
Author: fdoray <fdoray@chromium.org>
Date: Mon May 01 18:47:35 2017

Use ScopedTaskEnvironment instead of MessageLoopForUI in content 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=emircan@chromium.org, tdresser@chromium.org

Review-Url: https://codereview.chromium.org/2846933002
Cr-Commit-Position: refs/heads/master@{#468368}

[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/browser/renderer_host/input/gesture_event_queue_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/browser/renderer_host/input/input_router_impl_perftest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/browser/renderer_host/input/input_router_impl_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/browser/renderer_host/input/legacy_touch_event_queue_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/browser/renderer_host/input/passthrough_touch_event_queue_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/browser/renderer_host/input/touch_emulator_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/renderer/media/media_stream_video_capturer_source_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/renderer/media/media_stream_video_source_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/renderer/media/webrtc/media_stream_remote_video_source_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/renderer/media/webrtc/media_stream_track_metrics_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/renderer/media/webrtc/media_stream_video_webrtc_sink_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/renderer/media_capture_from_element/html_video_element_capturer_source_unittest.cc
[modify] https://crrev.com/8f9f016285a1178e63e8676ecc950db84a92cc65/content/renderer/media_recorder/media_recorder_handler_unittest.cc

Comment 27 by bugdroid1@chromium.org, May 2 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/72a220118ee319f86c84d6062ceae9200cb9e710

commit 72a220118ee319f86c84d6062ceae9200cb9e710
Author: fdoray <fdoray@chromium.org>
Date: Tue May 02 12:32:29 2017

Use ScopedTaskEnvironment instead of MessageLoopForUI in chrome 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

Review-Url: https://codereview.chromium.org/2851593002
Cr-Commit-Position: refs/heads/master@{#468608}

[modify] https://crrev.com/72a220118ee319f86c84d6062ceae9200cb9e710/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc
[modify] https://crrev.com/72a220118ee319f86c84d6062ceae9200cb9e710/chrome/browser/chromeos/settings/install_attributes_unittest.cc
[modify] https://crrev.com/72a220118ee319f86c84d6062ceae9200cb9e710/chrome/browser/password_manager/native_backend_libsecret_unittest.cc
[modify] https://crrev.com/72a220118ee319f86c84d6062ceae9200cb9e710/chrome/browser/ui/app_list/search/history_unittest.cc
[modify] https://crrev.com/72a220118ee319f86c84d6062ceae9200cb9e710/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa_unittest.mm
[modify] https://crrev.com/72a220118ee319f86c84d6062ceae9200cb9e710/chrome/browser/ui/cocoa/toolbar/app_toolbar_button_cell_unittest.mm
[modify] https://crrev.com/72a220118ee319f86c84d6062ceae9200cb9e710/chrome/browser/ui/omnibox/clipboard_utils_unittest.cc
[modify] https://crrev.com/72a220118ee319f86c84d6062ceae9200cb9e710/chrome/browser/ui/views/frame/web_contents_close_handler_unittest.cc

Comment 28 by bugdroid1@chromium.org, May 2 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6

commit 1c906dc6495ff5c831a19b72a1f8fb265d1eacf6
Author: fdoray <fdoray@chromium.org>
Date: Tue May 02 20:15:43 2017

Use ScopedTaskEnvironment instead of MessageLoopForUI in ui/aura/test/.

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

TBR=sky@chromium.org
BUG=708584

Review-Url: https://codereview.chromium.org/2849423002
Cr-Commit-Position: refs/heads/master@{#468756}

[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/content/public/test/test_renderer_host.cc
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/aura/BUILD.gn
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/aura/test/aura_test_base.cc
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/aura/test/aura_test_base.h
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/aura/test/aura_test_helper.cc
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/aura/test/aura_test_helper.h
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/keyboard/keyboard_controller_unittest.cc
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/snapshot/snapshot_aura_unittest.cc
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/views/test/scoped_views_test_helper.cc
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/views/test/views_test_helper.h
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/views/test/views_test_helper_aura.cc
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/views/test/views_test_helper_aura.h
[modify] https://crrev.com/1c906dc6495ff5c831a19b72a1f8fb265d1eacf6/ui/views/test/views_test_helper_mac.mm

Comment 29 by bugdroid1@chromium.org, May 4 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f58e951e440d1a57e94536ed34aae1715eedf21

commit 1f58e951e440d1a57e94536ed34aae1715eedf21
Author: gab <gab@chromium.org>
Date: Thu May 04 23:28:51 2017

Improve usage documentation of scoped task environments.

And improve information provided by out-of-order destruction of task
scheduler and its provided constructs in unit tests.

(comes out of discussion on https://codereview.chromium.org/2852333004/)

BUG=708584,  689520 
TBR=avi@chromium.org (documentation update in test_browser_thread_bundle.h)

Review-Url: https://codereview.chromium.org/2860063003
Cr-Commit-Position: refs/heads/master@{#469516}

[modify] https://crrev.com/1f58e951e440d1a57e94536ed34aae1715eedf21/base/task_scheduler/scheduler_single_thread_task_runner_manager.cc
[modify] https://crrev.com/1f58e951e440d1a57e94536ed34aae1715eedf21/base/test/scoped_task_environment.h
[modify] https://crrev.com/1f58e951e440d1a57e94536ed34aae1715eedf21/content/public/test/test_browser_thread_bundle.h

Comment 30 by bugdroid1@chromium.org, May 5 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5742c3808b947b73c4e279c2f753e59e284a1910

commit 5742c3808b947b73c4e279c2f753e59e284a1910
Author: c.padhi <c.padhi@samsung.com>
Date: Fri May 05 17:09:54 2017

Use ScopedTaskEnvironment instead of MessageLoop in media/capture/ 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

Review-Url: https://codereview.chromium.org/2859273004
Cr-Commit-Position: refs/heads/master@{#469691}

[modify] https://crrev.com/5742c3808b947b73c4e279c2f753e59e284a1910/media/capture/video/fake_video_capture_device_unittest.cc
[modify] https://crrev.com/5742c3808b947b73c4e279c2f753e59e284a1910/media/capture/video/linux/v4l2_capture_delegate_unittest.cc
[modify] https://crrev.com/5742c3808b947b73c4e279c2f753e59e284a1910/media/capture/video/video_capture_device_unittest.cc

Comment 31 by bugdroid1@chromium.org, May 8 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e324edd539822b440ee78bd375f8dc0e284f39b6

commit e324edd539822b440ee78bd375f8dc0e284f39b6
Author: fdoray <fdoray@chromium.org>
Date: Mon May 08 16:21:46 2017

Remove usage of ScopedTaskScheduler.

This CL removes usage of ScopedTaskScheduler in tests where that
doesn't require too much refactoring. ScopedTaskScheduler has been
deprecated in favor of ScopedTaskEnvironment.

BUG=708584
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_site_isolation;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
TBR=sky@chromium.org, alokp@chromium.org, stevenjb@chromium.org,
hajimehoshi@chromium.org, jam@chromium.org, scheib@chromium.org, chcunningham@chromium.org

Review-Url: https://codereview.chromium.org/2840593002
Cr-Commit-Position: refs/heads/master@{#470003}

[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/chrome/browser/conflicts/module_database_win_unittest.cc
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/chrome/browser/conflicts/module_event_sink_impl_win_unittest.cc
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/chrome/browser/mac/keystone_glue_unittest.mm
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/chromeos/disks/disk_mount_manager_unittest.cc
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/components/translate/core/browser/translate_ranker_impl_unittest.cc
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/content/browser/renderer_host/text_input_client_mac_unittest.mm
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/device/bluetooth/bluez/bluetooth_adapter_profile_bluez_unittest.cc
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/media/base/demuxer_perftest.cc
[modify] https://crrev.com/e324edd539822b440ee78bd375f8dc0e284f39b6/media/gpu/video_decode_accelerator_unittest.cc

Comment 32 by bugdroid1@chromium.org, May 8 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/09a43efb68e4412a8e091272df60eef6f50ac355

commit 09a43efb68e4412a8e091272df60eef6f50ac355
Author: fdoray <fdoray@chromium.org>
Date: Mon May 08 16:26:57 2017

Use ScopedTaskEnvironment instead of MessageLoop in tests that use v8.

This is a prerequisite to migrate v8 from base::WorkerPool to
base::TaskScheduler.

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

Review-Url: https://codereview.chromium.org/2852373004
Cr-Commit-Position: refs/heads/master@{#470007}

[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/chrome/test/base/v8_unit_test.cc
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/chrome/test/base/v8_unit_test.h
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/content/test/blink_test_environment.cc
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/content/test/ppapi_unittest.cc
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/content/test/ppapi_unittest.h
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/extensions/renderer/api_binding_test.h
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/extensions/renderer/gc_callback_unittest.cc
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/gin/BUILD.gn
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/gin/modules/timer_unittest.cc
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/gin/shell_runner_unittest.cc
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/gin/test/file_runner.cc
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/gin/test/v8_test.h
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/mojo/edk/js/tests/BUILD.gn
[modify] https://crrev.com/09a43efb68e4412a8e091272df60eef6f50ac355/mojo/edk/js/tests/js_to_cpp_tests.cc

Comment 33 by bugdroid1@chromium.org, May 8 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/752948ba8f63184d42f7188a82d5580686e428f6

commit 752948ba8f63184d42f7188a82d5580686e428f6
Author: fdoray <fdoray@chromium.org>
Date: Mon May 08 18:01:48 2017

Use ScopedTaskEnvironment instead of MessageLoop in RenderViewTest.

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

This CL also removes RenderViewTest::ProcessPendingMessages().

BUG=708584
TBR=jam@chromium.org

Review-Url: https://codereview.chromium.org/2870633002
Cr-Commit-Position: refs/heads/master@{#470047}

[modify] https://crrev.com/752948ba8f63184d42f7188a82d5580686e428f6/chrome/renderer/autofill/form_autocomplete_browsertest.cc
[modify] https://crrev.com/752948ba8f63184d42f7188a82d5580686e428f6/chrome/renderer/content_settings_observer_browsertest.cc
[modify] https://crrev.com/752948ba8f63184d42f7188a82d5580686e428f6/components/printing/test/print_web_view_helper_browsertest.cc
[modify] https://crrev.com/752948ba8f63184d42f7188a82d5580686e428f6/content/public/test/render_view_test.cc
[modify] https://crrev.com/752948ba8f63184d42f7188a82d5580686e428f6/content/public/test/render_view_test.h
[modify] https://crrev.com/752948ba8f63184d42f7188a82d5580686e428f6/content/renderer/render_frame_impl_browsertest.cc
[modify] https://crrev.com/752948ba8f63184d42f7188a82d5580686e428f6/content/renderer/render_view_browsertest.cc
[modify] https://crrev.com/752948ba8f63184d42f7188a82d5580686e428f6/content/renderer/render_view_browsertest_mac.mm

Comment 34 by bugdroid1@chromium.org, May 9 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f4ba836bd766e11013078e3dfc96a64de3b3d146

commit f4ba836bd766e11013078e3dfc96a64de3b3d146
Author: fdoray <fdoray@chromium.org>
Date: Tue May 09 03:49:51 2017

Mark Scoped(Async)TaskScheduler as deprecated.

ScopedTaskEnvironment should be used instead.

BUG=708584
TBR=gab@chromium.org

Review-Url: https://codereview.chromium.org/2867003003
Cr-Commit-Position: refs/heads/master@{#470167}

[modify] https://crrev.com/f4ba836bd766e11013078e3dfc96a64de3b3d146/base/test/scoped_async_task_scheduler.h
[modify] https://crrev.com/f4ba836bd766e11013078e3dfc96a64de3b3d146/base/test/scoped_task_scheduler.h

Comment 35 by bugdroid1@chromium.org, May 9 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4093b79b5e57860bd7b90a9bc41bae5629d84c61

commit 4093b79b5e57860bd7b90a9bc41bae5629d84c61
Author: fdoray <fdoray@chromium.org>
Date: Tue May 09 17:49:23 2017

Use ScopedTaskEnvironment instead of MessageLoopForUI in ViewsTestBase.

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

Review-Url: https://codereview.chromium.org/2867663007
Cr-Commit-Position: refs/heads/master@{#470374}

[modify] https://crrev.com/4093b79b5e57860bd7b90a9bc41bae5629d84c61/chrome/browser/media/webrtc/native_desktop_media_list_unittest.cc
[modify] https://crrev.com/4093b79b5e57860bd7b90a9bc41bae5629d84c61/chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc
[modify] https://crrev.com/4093b79b5e57860bd7b90a9bc41bae5629d84c61/ui/views/controls/webview/webview_unittest.cc
[modify] https://crrev.com/4093b79b5e57860bd7b90a9bc41bae5629d84c61/ui/views/test/views_test_base.cc
[modify] https://crrev.com/4093b79b5e57860bd7b90a9bc41bae5629d84c61/ui/views/test/views_test_base.h
[modify] https://crrev.com/4093b79b5e57860bd7b90a9bc41bae5629d84c61/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc

Comment 37 by bugdroid1@chromium.org, May 10 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0839a600bb0f4266560df5d7eee73b51797df7c5

commit 0839a600bb0f4266560df5d7eee73b51797df7c5
Author: fdoray <fdoray@chromium.org>
Date: Wed May 10 18:05:36 2017

Do not flush main thread tasks in ~ScopedTaskEnvironment.

Flushing main thread tasks in ~ScopedTaskEnvironment prevents
MessageLoop from being replaced with ScopedTaskEnvironment in v8
tests that don't expect tasks to run without an explicit call to
RunLoop::Run/RunUntilIdle.

BUG=708584

Review-Url: https://codereview.chromium.org/2876583002
Cr-Commit-Position: refs/heads/master@{#470642}

[modify] https://crrev.com/0839a600bb0f4266560df5d7eee73b51797df7c5/base/test/scoped_task_environment.cc
[modify] https://crrev.com/0839a600bb0f4266560df5d7eee73b51797df7c5/base/test/scoped_task_environment.h

Comment 38 by bugdroid1@chromium.org, May 11 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/39a2ba43e67ba75529e838adc853f2ad1f2ce473

commit 39a2ba43e67ba75529e838adc853f2ad1f2ce473
Author: fdoray <fdoray@chromium.org>
Date: Thu May 11 00:05:42 2017

Use ScopedTaskEnvironment instead of MessageLoop in service_manager::test::ServiceTest.

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

Review-Url: https://codereview.chromium.org/2878453002
Cr-Commit-Position: refs/heads/master@{#470758}

[modify] https://crrev.com/39a2ba43e67ba75529e838adc853f2ad1f2ce473/content/browser/dom_storage/local_storage_context_mojo_unittest.cc
[modify] https://crrev.com/39a2ba43e67ba75529e838adc853f2ad1f2ce473/services/preferences/pref_service_factory_unittest.cc
[modify] https://crrev.com/39a2ba43e67ba75529e838adc853f2ad1f2ce473/services/service_manager/public/cpp/service_test.cc
[modify] https://crrev.com/39a2ba43e67ba75529e838adc853f2ad1f2ce473/services/service_manager/public/cpp/service_test.h
[modify] https://crrev.com/39a2ba43e67ba75529e838adc853f2ad1f2ce473/services/ui/ws/window_manager_client_unittest.cc

Comment 39 by bugdroid1@chromium.org, May 11 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f33fede528342549ee59c5cc2b8f4f966a3edec8

commit f33fede528342549ee59c5cc2b8f4f966a3edec8
Author: fdoray <fdoray@chromium.org>
Date: Thu May 11 21:18:10 2017

Use ScopedTaskEnvironment instead of MessageLoopForIO in net unit 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).

Switching from MessageLoopForIO to ScopedTaskEnvironment in
NetTestSuite allows Scoped(Async)TaskScheduler to be removed
from individual net unittests.

Motivation for ScopedTaskEnvironment can be found in:
https://docs.google.com/document/d/1QabRo8c7D9LsYY3cEcaPQbOCLo8Tu-6VLykYXyl3Pkk/edit

BUG=708584

Review-Url: https://codereview.chromium.org/2839663002
Cr-Commit-Position: refs/heads/master@{#471073}

[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/base/directory_lister_unittest.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/disk_cache/disk_cache_test_base.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/disk_cache/disk_cache_test_base.h
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/dns/address_sorter_unittest.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/http/http_network_transaction_ssl_unittest.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/http/http_network_transaction_unittest.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/quic/chromium/quic_end_to_end_unittest.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/socket/ssl_client_socket_unittest.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/ssl/channel_id_service_unittest.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/test/net_test_suite.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/test/net_test_suite.h
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/url_request/url_fetcher_impl_unittest.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/url_request/url_request_context_builder_unittest.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/url_request/url_request_data_job_fuzzer.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/url_request/url_request_file_dir_job_unittest.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/url_request/url_request_simple_job_unittest.cc
[modify] https://crrev.com/f33fede528342549ee59c5cc2b8f4f966a3edec8/net/url_request/url_request_unittest.cc

Comment 40 by bugdroid1@chromium.org, May 12 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/897fedad953f7ef4d6d092e3f7ad6d7a34900eea

commit 897fedad953f7ef4d6d092e3f7ad6d7a34900eea
Author: fdoray <fdoray@chromium.org>
Date: Fri May 12 12:39:59 2017

Add ScopedTaskEnvironment in extensions::ModuleSystemTest.

This is a prerequisite to migrate v8_platform.cc from
base::WorkerPool to base::TaskScheduler.

BUG=708584
TBR=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2876123003
Cr-Commit-Position: refs/heads/master@{#471286}

[modify] https://crrev.com/897fedad953f7ef4d6d092e3f7ad6d7a34900eea/extensions/renderer/api_test_base.h
[modify] https://crrev.com/897fedad953f7ef4d6d092e3f7ad6d7a34900eea/extensions/renderer/module_system_test.h

Comment 41 by bugdroid1@chromium.org, May 15 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/41b3811f190e351cd29a39589eb0aed8fdaedd8e

commit 41b3811f190e351cd29a39589eb0aed8fdaedd8e
Author: fdoray <fdoray@chromium.org>
Date: Mon May 15 18:24:04 2017

Remove TestWebThreadBundle::REAL_TASK_SCHEDULER.

This option was also removed from content::TestBrowserThreadBundle.
https://codereview.chromium.org/2767923002

BUG=708584

Review-Url: https://codereview.chromium.org/2887463002
Cr-Commit-Position: refs/heads/master@{#471835}

[modify] https://crrev.com/41b3811f190e351cd29a39589eb0aed8fdaedd8e/ios/web/public/test/test_web_thread_bundle.h
[modify] https://crrev.com/41b3811f190e351cd29a39589eb0aed8fdaedd8e/ios/web/test/test_web_thread_bundle.cc

Comment 42 by bugdroid1@chromium.org, May 16 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/812f416e1368152c31893028eeee7e85bd25e827

commit 812f416e1368152c31893028eeee7e85bd25e827
Author: fdoray <fdoray@chromium.org>
Date: Tue May 16 15:34:51 2017

Add ScopedTaskEnvironment::GetMainThreadTaskRunner().

This will avoid the need to store the main thread TaskRunner in
a member variable in tests that need to post to the main thread
from other threads (e.g.
https://chromium.googlesource.com/chromium/src/+/134190a648fe48fed0486cf8889569863e4a544c/media/capture/video/video_capture_device_unittest.cc#109)

BUG=708584

Review-Url: https://codereview.chromium.org/2885783002
Cr-Commit-Position: refs/heads/master@{#472111}

[modify] https://crrev.com/812f416e1368152c31893028eeee7e85bd25e827/base/test/scoped_task_environment.cc
[modify] https://crrev.com/812f416e1368152c31893028eeee7e85bd25e827/base/test/scoped_task_environment.h

Comment 43 by gab@chromium.org, May 18 2017

Blockedon: 724077

Comment 44 by bugdroid1@chromium.org, Jul 18 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/97fd4164e16d4b9c39f6ce81a0ccc963b55b02a7

commit 97fd4164e16d4b9c39f6ce81a0ccc963b55b02a7
Author: Gabriel Charette <gab@chromium.org>
Date: Tue Jul 18 15:35:45 2017

Do not flush TaskScheduler in ~TestBrowserThreadBundle if it's not managed by it.

This fixes hangs in https://codereview.chromium.org/2890853002/.

New regression test hangs without matching test_browser_thread.cc 
changes.

We support adding a TestBrowserThreadBundle on top of an explicit
ScopedTaskEnvironment (i.e. to add named threads in unit tests that
already otherwise inherit a ScopedTaskEnvironment or need to provide a
custom one). However if the ScopedTaskEnvironment uses a QUEUED mode,
trying to flush it in ~TestBrowserThreadBundle() results in a hang.
Flushing TaskScheduler when it's not managed by that
TestBrowserThreadBundle was wrong anyways.

Bug: 708584,  689520 
Change-Id: I3087537ad4f1065fc974170b00c25a676ff5e4c9
Reviewed-on: https://chromium-review.googlesource.com/575593
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487481}
[modify] https://crrev.com/97fd4164e16d4b9c39f6ce81a0ccc963b55b02a7/content/public/test/test_browser_thread_bundle.cc
[modify] https://crrev.com/97fd4164e16d4b9c39f6ce81a0ccc963b55b02a7/content/public/test/test_browser_thread_bundle_unittest.cc

Comment 45 by bugdroid1@chromium.org, Jul 26 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a042b2028a1f8984c49f7a985968e970524e0089

commit a042b2028a1f8984c49f7a985968e970524e0089
Author: Francois Doray <fdoray@chromium.org>
Date: Wed Jul 26 17:35:55 2017

Remove usage of ScopedTaskScheduler from address_normalizer_impl_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: I55e42c2ec29c1802ba52d2d814b7a6259b9e1821
Reviewed-on: https://chromium-review.googlesource.com/587028
Commit-Queue: Mathieu Perreault <mathp@chromium.org>
Reviewed-by: Mathieu Perreault <mathp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489683}
[modify] https://crrev.com/a042b2028a1f8984c49f7a985968e970524e0089/components/payments/core/address_normalizer_impl_unittest.cc

Comment 46 by bugdroid1@chromium.org, Jul 26 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/754953a479eab9a4255852ec1e29c65e7bdc14a2

commit 754953a479eab9a4255852ec1e29c65e7bdc14a2
Author: Francois Doray <fdoray@chromium.org>
Date: Wed Jul 26 17:38:21 2017

Remove usage of ScopedTaskScheduler from subkey_requester_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: I84df1bdec3cd336bd2e9c9366aea032c7809f597
Reviewed-on: https://chromium-review.googlesource.com/586988
Commit-Queue: Mathieu Perreault <mathp@chromium.org>
Reviewed-by: Mathieu Perreault <mathp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489685}
[modify] https://crrev.com/754953a479eab9a4255852ec1e29c65e7bdc14a2/components/payments/core/subkey_requester_unittest.cc

Comment 47 by bugdroid1@chromium.org, Jul 27 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/34cd1fc9c6c9b72077119b8693209935ea77df23

commit 34cd1fc9c6c9b72077119b8693209935ea77df23
Author: Francois Doray <fdoray@chromium.org>
Date: Thu Jul 27 16:20:39 2017

Remove usage of ScopedTaskScheduler from network_connection_handler_impl_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: I330e73d731488954884aefbb8c420c78d9bc5147
Reviewed-on: https://chromium-review.googlesource.com/587007
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489960}
[modify] https://crrev.com/34cd1fc9c6c9b72077119b8693209935ea77df23/chromeos/network/network_connection_handler_impl_unittest.cc

Comment 48 by bugdroid1@chromium.org, Jul 27 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4080e94e09abb06a783aa34fed5d167b41282cc2

commit 4080e94e09abb06a783aa34fed5d167b41282cc2
Author: Francois Doray <fdoray@chromium.org>
Date: Thu Jul 27 16:39:52 2017

Remove usage of ScopedTaskScheduler from network_cert_migrator_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: I6353ae2509e4fdcc868cd3dabda489a1d39a5fc8
Reviewed-on: https://chromium-review.googlesource.com/586989
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489970}
[modify] https://crrev.com/4080e94e09abb06a783aa34fed5d167b41282cc2/chromeos/network/network_cert_migrator_unittest.cc

Comment 49 by bugdroid1@chromium.org, Jul 27 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b5369f8eb98b6ff168b74e9d20a9d5ae0d9c426d

commit b5369f8eb98b6ff168b74e9d20a9d5ae0d9c426d
Author: Francois Doray <fdoray@chromium.org>
Date: Thu Jul 27 16:43:06 2017

Remove usage of ScopedTaskScheduler from remoting/protocol/connection_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: I823689a9f1ae22de34c43e962d698ffcdac5c72c
Reviewed-on: https://chromium-review.googlesource.com/586914
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489974}
[modify] https://crrev.com/b5369f8eb98b6ff168b74e9d20a9d5ae0d9c426d/remoting/protocol/connection_unittest.cc

Comment 50 by bugdroid1@chromium.org, Jul 27 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7302f44e3cb9ce82e1b1305a65426f4942c63ef4

commit 7302f44e3cb9ce82e1b1305a65426f4942c63ef4
Author: Francois Doray <fdoray@chromium.org>
Date: Thu Jul 27 16:49:45 2017

Remove usage of ScopedTaskScheduler from module_inspector_win_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: Ic545a95789522a78180f232deebd258c5d816c40
Reviewed-on: https://chromium-review.googlesource.com/586922
Reviewed-by: Patrick Monette <pmonette@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489978}
[modify] https://crrev.com/7302f44e3cb9ce82e1b1305a65426f4942c63ef4/chrome/browser/conflicts/module_inspector_win_unittest.cc

Comment 51 by bugdroid1@chromium.org, Jul 27 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7e81058ee68b488faeba3348713f1931adbbb997

commit 7e81058ee68b488faeba3348713f1931adbbb997
Author: Francois Doray <fdoray@chromium.org>
Date: Thu Jul 27 17:10:53 2017

Remove usage of ScopedTaskScheduler from update_checker_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: Icf3671259d2798e7df6296acead2ff71e8ecfaa6
Reviewed-on: https://chromium-review.googlesource.com/586969
Reviewed-by: Sorin Jianu <sorin@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489993}
[modify] https://crrev.com/7e81058ee68b488faeba3348713f1931adbbb997/components/update_client/update_checker_unittest.cc

Comment 52 by bugdroid1@chromium.org, Jul 27 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ff8a645cab8e19dee7dea4e11ae7b7e7128b6e77

commit ff8a645cab8e19dee7dea4e11ae7b7e7128b6e77
Author: Francois Doray <fdoray@chromium.org>
Date: Thu Jul 27 17:11:58 2017

Remove usage of ScopedTaskScheduler from request_sender_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: I6714ac78f30355bff8fd06bcc08728f77f7aaa02
Reviewed-on: https://chromium-review.googlesource.com/586856
Reviewed-by: Sorin Jianu <sorin@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489994}
[modify] https://crrev.com/ff8a645cab8e19dee7dea4e11ae7b7e7128b6e77/components/update_client/request_sender_unittest.cc

Comment 53 by bugdroid1@chromium.org, Jul 27 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/50de2a6b766664b227a066f8004287e0e0af2837

commit 50de2a6b766664b227a066f8004287e0e0af2837
Author: Francois Doray <fdoray@chromium.org>
Date: Thu Jul 27 17:12:03 2017

Remove usage of ScopedTaskScheduler from ranker_model_loader_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: I0593cc391d1db86fee9bf35c605a4dac788cf5f4
Reviewed-on: https://chromium-review.googlesource.com/587027
Reviewed-by: Roger McFarlane <rogerm@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489995}
[modify] https://crrev.com/50de2a6b766664b227a066f8004287e0e0af2837/components/machine_intelligence/ranker_model_loader_unittest.cc

Comment 54 by bugdroid1@chromium.org, Jul 28 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d7857cacfa04092fb59f94df26cd5b9a47c3151

commit 8d7857cacfa04092fb59f94df26cd5b9a47c3151
Author: Francois Doray <fdoray@chromium.org>
Date: Fri Jul 28 15:16:46 2017

Remove usage of ScopedTaskScheduler from auto_connect_handler_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: I24d69017c082a27cfe34dabba6bc6861d3f8749a
Reviewed-on: https://chromium-review.googlesource.com/586923
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490394}
[modify] https://crrev.com/8d7857cacfa04092fb59f94df26cd5b9a47c3151/chromeos/network/auto_connect_handler_unittest.cc

Comment 55 by bugdroid1@chromium.org, Jul 28 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6a10435ae583f3015e88d47bec2f6427b265a5dd

commit 6a10435ae583f3015e88d47bec2f6427b265a5dd
Author: Francois Doray <fdoray@chromium.org>
Date: Fri Jul 28 15:17:04 2017

Remove ScopedTaskScheduler usage from cert_loader_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: Iae06025b62cf9bfea43d383a3b2a8311263dcf5c
Reviewed-on: https://chromium-review.googlesource.com/586909
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490395}
[modify] https://crrev.com/6a10435ae583f3015e88d47bec2f6427b265a5dd/chromeos/cert_loader_unittest.cc

Comment 56 by bugdroid1@chromium.org, Jul 28 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ef3543954e4eb6582d3b70817dc2c6345ea1df4d

commit ef3543954e4eb6582d3b70817dc2c6345ea1df4d
Author: Francois Doray <fdoray@chromium.org>
Date: Fri Jul 28 15:18:02 2017

Remove usage of ScopedTaskScheduler from client_cert_resolver_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: Ib17cbb11344009fa228e3533905d8f44bfff1c79
Reviewed-on: https://chromium-review.googlesource.com/586970
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490396}
[modify] https://crrev.com/ef3543954e4eb6582d3b70817dc2c6345ea1df4d/chromeos/network/client_cert_resolver_unittest.cc

Comment 57 by bugdroid1@chromium.org, Jul 28 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d5aa3b99e65fa36659b334db88da1dfb149fe22d

commit d5aa3b99e65fa36659b334db88da1dfb149fe22d
Author: Francois Doray <fdoray@chromium.org>
Date: Fri Jul 28 15:38:41 2017

Remove usage of ScopedTaskScheduler from translate_script_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: I7e5e3aeaccdf1bcaea4bfe72421cb667d427e5ef
Reviewed-on: https://chromium-review.googlesource.com/587008
Reviewed-by: Rachel Blum <groby@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490403}
[modify] https://crrev.com/d5aa3b99e65fa36659b334db88da1dfb149fe22d/components/translate/core/browser/translate_script_unittest.cc

Comment 58 by bugdroid1@chromium.org, Jul 31 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b0f1e225b0d76964943e17a7b0fae25bd19add5

commit 5b0f1e225b0d76964943e17a7b0fae25bd19add5
Author: Francois Doray <fdoray@chromium.org>
Date: Mon Jul 31 16:14:40 2017

Remove usage of ScopedTaskScheduler from browser_process_impl_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: I011a4eab603068729a0c754e4e4dc6a33b23ec77
Reviewed-on: https://chromium-review.googlesource.com/586924
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490773}
[modify] https://crrev.com/5b0f1e225b0d76964943e17a7b0fae25bd19add5/chrome/browser/browser_process_impl_unittest.cc

Comment 59 by bugdroid1@chromium.org, Jul 31 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/95643dc55e7cff3663d4fd5144c06fc965e8063c

commit 95643dc55e7cff3663d4fd5144c06fc965e8063c
Author: Francois Doray <fdoray@chromium.org>
Date: Mon Jul 31 16:50:20 2017

Remove usage of ScopedAsyncTaskScheduler from SequencedModelWorkerTest.

ScopedAsyncTaskScheduler is deprecated.

Bug: 708584
Change-Id: If36e43e68fe63bee75f2b34f13f98acaa8571f1c
Reviewed-on: https://chromium-review.googlesource.com/591988
Reviewed-by: Stanislav Chiknavaryan <stanisc@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490775}
[modify] https://crrev.com/95643dc55e7cff3663d4fd5144c06fc965e8063c/components/sync/engine/sequenced_model_worker_unittest.cc

Comment 60 by bugdroid1@chromium.org, Jul 31 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/15e50e3ac0766c76735c516387e21d991481a2d7

commit 15e50e3ac0766c76735c516387e21d991481a2d7
Author: Francois Doray <fdoray@chromium.org>
Date: Mon Jul 31 22:10:15 2017

Remove usage of ScopedAsyncTaskScheduler from automatic_reboot_manager_unittest.cc.

ScopedAsyncTaskScheduler is deprecated.

Bug: 708584
Change-Id: Id7fe750e4e3201ed8ccda267cf296ed83dffd96b
Reviewed-on: https://chromium-review.googlesource.com/592244
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490805}
[modify] https://crrev.com/15e50e3ac0766c76735c516387e21d991481a2d7/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc

Comment 61 by bugdroid1@chromium.org, Jul 31 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/26486308a3f4f2443a15f4c5813c0cab0b53c8d8

commit 26486308a3f4f2443a15f4c5813c0cab0b53c8d8
Author: Francois Doray <fdoray@chromium.org>
Date: Mon Jul 31 23:15:23 2017

Remove usage of ScopedTaskScheduler from PipelineIntegrationTestBase.

ScopedTaskScheduler is deprecated.

Bug: 708584
Change-Id: I148560146aa121d8e83fc416b1f86e35934d9054
Reviewed-on: https://chromium-review.googlesource.com/586915
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490817}
[modify] https://crrev.com/26486308a3f4f2443a15f4c5813c0cab0b53c8d8/media/test/pipeline_integration_test.cc
[modify] https://crrev.com/26486308a3f4f2443a15f4c5813c0cab0b53c8d8/media/test/pipeline_integration_test_base.cc
[modify] https://crrev.com/26486308a3f4f2443a15f4c5813c0cab0b53c8d8/media/test/pipeline_integration_test_base.h

Comment 62 by bugdroid1@chromium.org, Jul 31 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/72e361be270494e785d16073c2b54f258273f61e

commit 72e361be270494e785d16073c2b54f258273f61e
Author: Francois Doray <fdoray@chromium.org>
Date: Mon Jul 31 23:32:44 2017

Remove usage of ScopedAsyncTaskScheduler from bluetooth_socket_bluez_unittest.cc.

ScopedAsyncTaskScheduler is deprecated.

Bug: 708584
Change-Id: If09d3f1395fd46bcc2394d91096c3eae54bf932b
Reviewed-on: https://chromium-review.googlesource.com/592163
Commit-Queue: Rahul Chaturvedi <rkc@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490820}
[modify] https://crrev.com/72e361be270494e785d16073c2b54f258273f61e/device/bluetooth/bluez/bluetooth_socket_bluez_unittest.cc

Comment 63 by bugdroid1@chromium.org, Aug 2 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8a35cabfa726ff86928c1f820d932c19a75b2e45

commit 8a35cabfa726ff86928c1f820d932c19a75b2e45
Author: Francois Doray <fdoray@chromium.org>
Date: Wed Aug 02 04:50:05 2017

Remove usage of ScopedAsyncTaskScheduler from BackgroundTaskRunnerTest.cpp.

ScopedAsyncTaskScheduler is deprecated.

Bug: 708584
Change-Id: Ia368d30ef1fd7b93519bf66845e5234505b0464c
Reviewed-on: https://chromium-review.googlesource.com/592164
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491269}
[modify] https://crrev.com/8a35cabfa726ff86928c1f820d932c19a75b2e45/third_party/WebKit/Source/platform/threading/BackgroundTaskRunnerTest.cpp

Comment 64 by bugdroid1@chromium.org, Aug 2 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/69f889fb155aa12a89031aef603dd3f035c250d1

commit 69f889fb155aa12a89031aef603dd3f035c250d1
Author: Francois Doray <fdoray@chromium.org>
Date: Wed Aug 02 15:42:12 2017

Remove usage of ScopedAsyncTaskScheduler from TestBrowserThreadBundle.

ScopedAsyncTaskScheduler is deprecated.

Bug: 708584
Change-Id: I795e7d07947369c202ea767b05543bb44474ff47
Reviewed-on: https://chromium-review.googlesource.com/591788
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491383}
[modify] https://crrev.com/69f889fb155aa12a89031aef603dd3f035c250d1/chrome/browser/io_thread_unittest.cc
[modify] https://crrev.com/69f889fb155aa12a89031aef603dd3f035c250d1/content/public/test/test_browser_thread_bundle.cc
[modify] https://crrev.com/69f889fb155aa12a89031aef603dd3f035c250d1/content/public/test/test_browser_thread_bundle.h

Comment 65 by bugdroid1@chromium.org, Aug 3 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/891e65c5fcdd9e9639a60ee36a53bdbb4121319c

commit 891e65c5fcdd9e9639a60ee36a53bdbb4121319c
Author: Francois Doray <fdoray@chromium.org>
Date: Thu Aug 03 17:28:12 2017

Remove usage of ScopedAsyncTaskScheduler from gl_image_test_template.h.

ScopedAsyncTaskScheduler is deprecated.

Bug: 708584
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I89b92c36e714f4eb02b84f5130a75edf377cd8bf
Reviewed-on: https://chromium-review.googlesource.com/591880
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: John Bauman <jbauman@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491778}
[modify] https://crrev.com/891e65c5fcdd9e9639a60ee36a53bdbb4121319c/ui/gl/test/gl_image_test_template.h
[modify] https://crrev.com/891e65c5fcdd9e9639a60ee36a53bdbb4121319c/ui/gl/test/run_all_unittests.cc

Comment 66 by bugdroid1@chromium.org, Aug 3 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e38550ecc69408283fbbb2d889f58bdfda9cfe89

commit e38550ecc69408283fbbb2d889f58bdfda9cfe89
Author: Francois Doray <fdoray@chromium.org>
Date: Thu Aug 03 17:52:33 2017

Remove usage of ScopedTaskScheduler from ffmpeg_demuxer_unittest.cc.

ScopedTaskScheduler is deprecated.

Bug: 708584
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I583be368ed89cdc687078bd8b72fcf2edf240afa
Reviewed-on: https://chromium-review.googlesource.com/586912
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491786}
[modify] https://crrev.com/e38550ecc69408283fbbb2d889f58bdfda9cfe89/media/filters/ffmpeg_demuxer_unittest.cc

Comment 67 by bugdroid1@chromium.org, Aug 3 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/850e8aa588a8bec900bfb533dad9a1c63fb06091

commit 850e8aa588a8bec900bfb533dad9a1c63fb06091
Author: Francois Doray <fdoray@chromium.org>
Date: Thu Aug 03 18:49:22 2017

Remove usage of ScopedAsyncTaskScheduler from chrome_component_updater_configurator_unittest.cc.

The ScopedAsyncTaskScheduler in 
chrome_component_updater_configurator_unittest.cc was useless. This CL
simply removes it.

Bug: 708584
Change-Id: Ia1cb9bfb343ddc5810421dc655227128c3a40979
Reviewed-on: https://chromium-review.googlesource.com/591949
Commit-Queue: Francois Doray <fdoray@chromium.org>
Reviewed-by: Sorin Jianu <sorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491806}
[modify] https://crrev.com/850e8aa588a8bec900bfb533dad9a1c63fb06091/chrome/browser/component_updater/chrome_component_updater_configurator_unittest.cc

Comment 68 by bugdroid1@chromium.org, Aug 7 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fef7242f6cf2a1100a5b4d53bf3b4686ac7ddf13

commit fef7242f6cf2a1100a5b4d53bf3b4686ac7ddf13
Author: Francois Doray <fdoray@chromium.org>
Date: Mon Aug 07 20:25:11 2017

Remove usage of ScopedAsyncTaskScheduler from TestWebThreadBundle.

This mirrors a TestBrowserThreadBundle change
https://chromium-review.googlesource.com/c/591788

NOPRESUBMIT=true

Bug: 708584
Change-Id: I05c64f9a0a9a2e78d630fb2b89a018bd732554c5
Reviewed-on: https://chromium-review.googlesource.com/601050
Commit-Queue: Francois Doray <fdoray@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492392}
[modify] https://crrev.com/fef7242f6cf2a1100a5b4d53bf3b4686ac7ddf13/ios/web/public/test/test_web_thread_bundle.h
[modify] https://crrev.com/fef7242f6cf2a1100a5b4d53bf3b4686ac7ddf13/ios/web/test/test_web_thread_bundle.cc

Comment 69 by bugdroid1@chromium.org, Aug 9 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7ab03b1282bf1526e3b3619253d202d9db0fd8c3

commit 7ab03b1282bf1526e3b3619253d202d9db0fd8c3
Author: Matt Wolenetz <wolenetz@chromium.org>
Date: Wed Aug 09 18:32:37 2017

Update ScopedTaskEnvironment to be resilient to tests quitting the RunLoop

Various tests (such as those using PipelineIntegrationTestBase::Seek()
and similar) use the (deprecated) MessageLoop::QuitWhenIdleClosure() or
RunLoop::QuitCurrentWhenIdleDeprecated().
That usage was previously incompatible with
ScopedTaskEnvironment::RunUntilIdle(), which expects its run_loop to
execute the OnQueueEmptyClosure (which is a OnceClosure). This was
causing things like media_pipeline_integration_fuzzer's ::Seek() to
crash due to the Seek completion having quit the run_loop without
running the ScopedTaskEnvironment's OnQueueEmptyClosure.

This change implements fdoray@'s suggestion (in lieu of fixing all
the related deprecated test usages for now) to just restart
ScopedTaskEnvironment::RunUntilIdle() in such cases.

BUG= 751011 ,708584
R=fdoray@chromium.org
TEST=Locally on linux, crashing fuzzer case runs to completion, and no media_unittests regression

Change-Id: Id99fe93e1eddfaa83bc90fa1ac61ce96c5ac6999
Reviewed-on: https://chromium-review.googlesource.com/604504
Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Francois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493066}
[modify] https://crrev.com/7ab03b1282bf1526e3b3619253d202d9db0fd8c3/base/test/scoped_task_environment.cc

Comment 70 by bugdroid1@chromium.org, Aug 11 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6059fd1d5460a4c66c18460c44b12c0f70201ebb

commit 6059fd1d5460a4c66c18460c44b12c0f70201ebb
Author: Francois Doray <fdoray@chromium.org>
Date: Fri Aug 11 14:04:35 2017

Remove usage of ScopedAsyncTaskScheduler from string_message_codec_unittest.cc.

ScopedAsyncTaskScheduler is deprecated.

Bug: 708584
Change-Id: I886855c04dc8945870f4ceea0f100ed9311088f0
Reviewed-on: https://chromium-review.googlesource.com/591697
Commit-Queue: Francois Doray <fdoray@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493720}
[modify] https://crrev.com/6059fd1d5460a4c66c18460c44b12c0f70201ebb/content/browser/android/string_message_codec_unittest.cc

Comment 71 by bugdroid1@chromium.org, Aug 11 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/82c0ccdf5cb5b747874a4166d5a6f381072e0244

commit 82c0ccdf5cb5b747874a4166d5a6f381072e0244
Author: Francois Doray <fdoray@chromium.org>
Date: Fri Aug 11 15:39:33 2017

Remove base::test::ScopedAsyncTaskScheduler.

This class is deprecated and not used anymore.

Bug: 708584
Change-Id: I85d219e43822dc0c29c970bf270eb714ea1509b0
Reviewed-on: https://chromium-review.googlesource.com/611957
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493753}
[modify] https://crrev.com/82c0ccdf5cb5b747874a4166d5a6f381072e0244/base/test/BUILD.gn
[delete] https://crrev.com/a3a25ad9a49976a552f5ed9221446c1c58f2e2a3/base/test/scoped_async_task_scheduler.cc
[delete] https://crrev.com/a3a25ad9a49976a552f5ed9221446c1c58f2e2a3/base/test/scoped_async_task_scheduler.h

Comment 72 by bugdroid1@chromium.org, Aug 14 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3bd98cae7cff683e862bee61f44e647768008042

commit 3bd98cae7cff683e862bee61f44e647768008042
Author: Gabriel Charette <gab@chromium.org>
Date: Mon Aug 14 18:02:04 2017

Mention ScopedTaskEnvironment as hint in post_task.cc instance DCHECK.

I often get asked what it means to hit this DCHECK and how to fix it.
Hint at typical solution directly in the error message.

The \n's attempt to isolate the hint between the CHECK and the Backtrace
in the log.

TBR=fdoray@chromium.org

Bug: 708584
Change-Id: I36417f1328313a15b274a2fcb26db9cc7418fe9e
Reviewed-on: https://chromium-review.googlesource.com/613686
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Francois Doray <fdoray@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494096}
[modify] https://crrev.com/3bd98cae7cff683e862bee61f44e647768008042/base/task_scheduler/post_task.cc

Comment 73 by kind...@yandex-team.ru, Oct 9 2017

Hi!

In CL: 
commit 86573e43dc92125878dcafc820c5dce12876317e
Review-Url: https://codereview.chromium.org/2800893002

MessageLoop was replaced by ScopedTaskEnvironment in many classes from "/content/renderer/media_recorder/" but not in "content/renderer/media_recorder/video_track_recorder_unittest.cc". 

I found that in video_track_recorder_unittest.cc the testing code checks "message_loop_.IsCurrent()" but ScopedTaskEnvironment has no IsCurrent() method. What are your plan? Are you going to add it or replace IsCurrent() in tests?

I urge MessageLoop to be removed in video_track_recorder_unittest.cc because we are getting "[FATAL:scoped_task_environment.cc(95)] Check failed: !TaskScheduler::GetInstance(). " when we run MessageLooped test and ScopedTaskEnvironmented test one by one.
For example, run: out/Debug/bin/run_content_unittests gtest -v --output-directory src/out/Debug --num-retries=0 --gtest-filter=VideoTrackRecorderTest.ConstructAndDestruct/5:WebContentsAudioInputStreamTest.MirroringNothing/1 and you will see.

Comment 74 by csharrison@chromium.org, Nov 17 2017

Hi! Just want to add a strong +1 for adding mock time to the ScopedTaskEnvironment. I have a bunch of tests that would love to combine nested RunLoop with mock time and I think that this is the way forward for a solution to that?

To make matters worse, I have seen tests which explicitly wait on a RunLoop without any time forwarding, so the test just sits until the {delayed task, clock, etc} fires! These tests could be trivially fixed with a ScopedTaskEnvironment that supports mock time (I think).

Comment 75 by b...@chromium.org, Nov 17 2017

Hi, another +1 for adding mock time.  It would make it possible for speed up several tests in //net.  For example, Request::WaitForResult(), DnsConfigServiceTest::WaitForConfig(), and SSLClientSocketTest.Write_WithSynchronousErrorNoRead all wait for actual time to pass so that a delayed task is executed, instead of being able to fast forward mock time:

https://cs.chromium.org/chromium/src/net/dns/mdns_client_unittest.cc?q=postdelayedtask&l=461
https://cs.chromium.org/chromium/src/net/dns/host_resolver_impl_unittest.cc?q=postdelayedtask&l=296
https://cs.chromium.org/chromium/src/net/dns/dns_config_service_unittest.cc?q=postdelayedtask&l=61

In https://crrev.com/c/776155, I am using TestMockTimeTaskRunner so that the test does not have to wait for five minutes for a PostDelayedTask'd task to execute.  Unfortunately some test fixtures in //net, like TestCompletionCallback, have base::RunLoop hardcoded:
https://cs.chromium.org/chromium/src/net/base/test_completion_callback.cc?q=RunLoop&l=26

This means that I would need to use TestMockTimeTaskRunner of Type::kBoundToThread to support nested loops.  However, net_unittests launcher uses ScopedTaskEnvironment, which is incompatible with TestMockTimeTaskRunner::Type::kBoundToThread.

ScopedTaskEnvironment supporting mock time would solve all these issues in a simple and elegant way.

Thank you for all your work on ScopedTaskEnvironment, this is a great improvement to our test framework!

Comment 76 by bugdroid1@chromium.org, Nov 21 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5e2df665dfce3a3aceb4852d90ad55d31fc36f20

commit 5e2df665dfce3a3aceb4852d90ad55d31fc36f20
Author: Gabriel Charette <gab@chromium.org>
Date: Tue Nov 21 23:19:34 2017

Add MOCK_TIME mode to ScopedTaskEnvironment :)

Taking advantage of the new kBoundToThread mode on
TestMockTimeTaskRunner.

This change also required tweaking the
ScopedTaskEnvironment::RunUntilIdle() logic as RunLoop().Run() on
TestMockTimeTaskRunner results in advancing time when there's no
request to quit-when-idle which is undesired here. New logic gets rid
of need for |on_queue_empty_closure_| and I think is simpler overall.
As of patch set 20, this new RunUntilIdle() logic also avoids using
TaskScheduler::FlushForTesting() as that can result in hangs should a
TaskScheduler task synchronously block on the main thread.

R=fdoray@chromium.org
TBR=gab@chromium.org (IWYU fixes)

Bug: 708584
Change-Id: I76ba55ec64d398151420379d3fcdcd5186fbceb8
Reviewed-on: https://chromium-review.googlesource.com/638550
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518433}
[modify] https://crrev.com/5e2df665dfce3a3aceb4852d90ad55d31fc36f20/base/observer_list_unittest.cc
[modify] https://crrev.com/5e2df665dfce3a3aceb4852d90ad55d31fc36f20/base/task_scheduler/task_tracker.cc
[modify] https://crrev.com/5e2df665dfce3a3aceb4852d90ad55d31fc36f20/base/task_scheduler/task_tracker.h
[modify] https://crrev.com/5e2df665dfce3a3aceb4852d90ad55d31fc36f20/base/test/scoped_task_environment.cc
[modify] https://crrev.com/5e2df665dfce3a3aceb4852d90ad55d31fc36f20/base/test/scoped_task_environment.h
[modify] https://crrev.com/5e2df665dfce3a3aceb4852d90ad55d31fc36f20/base/test/scoped_task_environment_unittest.cc
[modify] https://crrev.com/5e2df665dfce3a3aceb4852d90ad55d31fc36f20/media/test/pipeline_integration_test_base.h
[modify] https://crrev.com/5e2df665dfce3a3aceb4852d90ad55d31fc36f20/remoting/host/file_proxy_wrapper_linux_unittest.cc

Comment 77 by bugdroid1@chromium.org, Nov 22 2017

Project Member

Comment 78 by gab@chromium.org, Nov 22 2017

Glad to hear the enthusiasm around ScopedTaskEnvironment's MOCK_TIME mode :).

Indeed the goal is to make it trivial to have time fast-forward when there's only delayed work remaining during RunLoop::Run().
The MOCK_TIME mode just landed and supports that on the main thread of ScopedTaskEnvironment.

I'm now working on two improvements:
 1) Allow MOCK_TIME mode for MainThreadType::UI/IO as well.
 2) Let MOCK_TIME mode take effect across all threads (i.e. TaskScheduler threads and main thread).

Eventually I'd like to make MOCK_TIME the default mode in unit tests!

PS: Apologies for the slow pace, I'm technically on leave and only working on this in my spare time.

Comment 79 by bugdroid1@chromium.org, Nov 22 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5cf78561bec62240ed797baf804d587e749ee250

commit 5cf78561bec62240ed797baf804d587e749ee250
Author: Matt Giuca <mgiuca@chromium.org>
Date: Wed Nov 22 07:24:11 2017

Revert "Nits follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/638550"

This reverts commit 0af3ff209e663b1df60bdd53dac0ffc2ee3d6340.

Reason for revert: Blocking revert of r518433.
Bug:  787683 

Original change's description:
> Nits follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/638550
> 
> R=​robliao@chomium.org
> 
> Bug: 708584
> Change-Id: I9c362e5cc3880644392cc6afcf4754d2fc834ea8
> Reviewed-on: https://chromium-review.googlesource.com/783873
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Robert Liao <robliao@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#518521}

TBR=gab@chromium.org,robliao@chromium.org,robliao@chomium.org

Change-Id: I832c5f3aba7073614fa331dc427d9ef0f1053f52
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 708584
Reviewed-on: https://chromium-review.googlesource.com/784571
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518559}
[modify] https://crrev.com/5cf78561bec62240ed797baf804d587e749ee250/base/test/scoped_task_environment.cc
[modify] https://crrev.com/5cf78561bec62240ed797baf804d587e749ee250/base/test/scoped_task_environment.h

Comment 80 by bugdroid1@chromium.org, Nov 22 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/43644430175628bf838aae733530e25f96bf40c0

commit 43644430175628bf838aae733530e25f96bf40c0
Author: Matt Giuca <mgiuca@chromium.org>
Date: Wed Nov 22 07:27:18 2017

Revert "Add MOCK_TIME mode to ScopedTaskEnvironment :)"

This reverts commit 5e2df665dfce3a3aceb4852d90ad55d31fc36f20.

Reason for revert: Suspect causing flaky ProfileShortcutManagerTest.
Bug:  787683 

Original change's description:
> Add MOCK_TIME mode to ScopedTaskEnvironment :)
> 
> Taking advantage of the new kBoundToThread mode on
> TestMockTimeTaskRunner.
> 
> This change also required tweaking the
> ScopedTaskEnvironment::RunUntilIdle() logic as RunLoop().Run() on
> TestMockTimeTaskRunner results in advancing time when there's no
> request to quit-when-idle which is undesired here. New logic gets rid
> of need for |on_queue_empty_closure_| and I think is simpler overall.
> As of patch set 20, this new RunUntilIdle() logic also avoids using
> TaskScheduler::FlushForTesting() as that can result in hangs should a
> TaskScheduler task synchronously block on the main thread.
> 
> R=​fdoray@chromium.org
> TBR=gab@chromium.org (IWYU fixes)
> 
> Bug: 708584
> Change-Id: I76ba55ec64d398151420379d3fcdcd5186fbceb8
> Reviewed-on: https://chromium-review.googlesource.com/638550
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
> Reviewed-by: François Doray <fdoray@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#518433}

TBR=khorimoto@chromium.org,gab@chromium.org,fdoray@chromium.org,robliao@chromium.org

Change-Id: I8a8822b221c73159f02297a6b7bdd60ddc5c49bc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 708584
Reviewed-on: https://chromium-review.googlesource.com/784512
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518560}
[modify] https://crrev.com/43644430175628bf838aae733530e25f96bf40c0/base/observer_list_unittest.cc
[modify] https://crrev.com/43644430175628bf838aae733530e25f96bf40c0/base/task_scheduler/task_tracker.cc
[modify] https://crrev.com/43644430175628bf838aae733530e25f96bf40c0/base/task_scheduler/task_tracker.h
[modify] https://crrev.com/43644430175628bf838aae733530e25f96bf40c0/base/test/scoped_task_environment.cc
[modify] https://crrev.com/43644430175628bf838aae733530e25f96bf40c0/base/test/scoped_task_environment.h
[modify] https://crrev.com/43644430175628bf838aae733530e25f96bf40c0/base/test/scoped_task_environment_unittest.cc
[modify] https://crrev.com/43644430175628bf838aae733530e25f96bf40c0/media/test/pipeline_integration_test_base.h
[modify] https://crrev.com/43644430175628bf838aae733530e25f96bf40c0/remoting/host/file_proxy_wrapper_linux_unittest.cc

Comment 81 by bugdroid1@chromium.org, Nov 24 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d4723a3dfd0215a72507d10ce0bd0e75f5f76bb6

commit d4723a3dfd0215a72507d10ce0bd0e75f5f76bb6
Author: Gabriel Charette <gab@chromium.org>
Date: Fri Nov 24 00:11:18 2017

Reland "Add MOCK_TIME mode to ScopedTaskEnvironment :)"

Reland follow-up nits CL along with it this time
(https://chromium-review.googlesource.com/c/chromium/src/+/783873)

Initial CL made ProfileShortcutManagerTest flaky.

Running them locally it turns out they mostly pass but they spew out
a whole lot of "ScopedTaskEnvironment::RunUntilIdle() appears to be
stuck in infinite loop" warning logs (which were added in this CL).
This is because the ongoing tasks that prevent DisallowRunTasks()
are slow and the main thread goes into a busy loop trying to
DisallowRunTasks(). These tests being already slow, these prints
pushed them over the edge (I think).

DisallowRunTasks() was tweaked in this reland to not return until
either one task completes or a short timeout expires (see code
comments for detailed reasoning).

This also allows removing the YieldCurrentThread() logic in the original
CL as busy-looping is avoided altogether.

The LOG statement trying to catch infinite RunUntilIdle() was also
removed as it wasn't really the nice place for it (it should a counter
in the RunOrSkipTask() override if we want it later).

This is a reland of 5e2df665dfce3a3aceb4852d90ad55d31fc36f20
Original change's description:
> Add MOCK_TIME mode to ScopedTaskEnvironment :)
>
> Taking advantage of the new kBoundToThread mode on
> TestMockTimeTaskRunner.
>
> This change also required tweaking the
> ScopedTaskEnvironment::RunUntilIdle() logic as RunLoop().Run() on
> TestMockTimeTaskRunner results in advancing time when there's no
> request to quit-when-idle which is undesired here. New logic gets rid
> of need for |on_queue_empty_closure_| and I think is simpler overall.
> As of patch set 20, this new RunUntilIdle() logic also avoids using
> TaskScheduler::FlushForTesting() as that can result in hangs should a
> TaskScheduler task synchronously block on the main thread.
>
> R=fdoray@chromium.org
> TBR=gab@chromium.org (IWYU fixes)
>
> Bug: 708584
> Change-Id: I76ba55ec64d398151420379d3fcdcd5186fbceb8
> Reviewed-on: https://chromium-review.googlesource.com/638550
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
> Reviewed-by: François Doray <fdoray@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#518433}

TEST=Repro'ed  https://crbug.com/787683  locally and fixed.
TBR=gab@chromium.org (IWYU fixes)

Bug: 708584,  787683 
Change-Id: I511c159ccbb608aa54394a4f35c40ad14697196b
Reviewed-on: https://chromium-review.googlesource.com/788133
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519032}
[modify] https://crrev.com/d4723a3dfd0215a72507d10ce0bd0e75f5f76bb6/base/observer_list_unittest.cc
[modify] https://crrev.com/d4723a3dfd0215a72507d10ce0bd0e75f5f76bb6/base/task_scheduler/task_tracker.cc
[modify] https://crrev.com/d4723a3dfd0215a72507d10ce0bd0e75f5f76bb6/base/task_scheduler/task_tracker.h
[modify] https://crrev.com/d4723a3dfd0215a72507d10ce0bd0e75f5f76bb6/base/test/scoped_task_environment.cc
[modify] https://crrev.com/d4723a3dfd0215a72507d10ce0bd0e75f5f76bb6/base/test/scoped_task_environment.h
[modify] https://crrev.com/d4723a3dfd0215a72507d10ce0bd0e75f5f76bb6/base/test/scoped_task_environment_unittest.cc
[modify] https://crrev.com/d4723a3dfd0215a72507d10ce0bd0e75f5f76bb6/media/test/pipeline_integration_test_base.h
[modify] https://crrev.com/d4723a3dfd0215a72507d10ce0bd0e75f5f76bb6/remoting/host/file_proxy_wrapper_linux_unittest.cc

Comment 82 by bugdroid1@chromium.org, Dec 3 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/46c535d207b3648ddefdf3f9a588b69ac5ef31f2

commit 46c535d207b3648ddefdf3f9a588b69ac5ef31f2
Author: Gabriel Charette <gab@chromium.org>
Date: Sun Dec 03 12:14:01 2017

Make RunLoop::Delegate methods public.

This mimics the pre-existing paradigm for MessagePump::Delegate :
public methods on Delegate which are then privately inherited.

There were cr-dev discussions on these topics (composition vs private
inheritance) but I don't see a reason to deviate from the
pre-established MessagePump paradigm here.
https://groups.google.com/a/chromium.org/d/topic/chromium-dev/XdsXTHy9lis/discussion
https://groups.google.com/a/chromium.org/d/topic/chromium-dev/CwzjcWd9cYM/discussion

I did consider composition here (e.g. with a private RunDelegate
class in MessageLoop, but the many outer_-> in
Run/Quit/EnsureWorkScheduled made it ugly.

R=danakj@chromium.org

Bug: 708584
Change-Id: I42830b3a28d29b1a518db4cfc767a655de491a90
Reviewed-on: https://chromium-review.googlesource.com/798290
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521227}
[modify] https://crrev.com/46c535d207b3648ddefdf3f9a588b69ac5ef31f2/base/run_loop.h

Comment 83 by bugdroid1@chromium.org, Dec 3 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1ef212bd9089eeef23b2e4692ff8a9ebed09c4ee

commit 1ef212bd9089eeef23b2e4692ff8a9ebed09c4ee
Author: Gabriel Charette <gab@chromium.org>
Date: Sun Dec 03 12:47:21 2017

Introduce RunLoop::OverrideDelegateForCurrentThreadForTesting().

This is a prerequisite to enable ScopedTaskEnvironment MOCK_TIME
on top of any RunLoop::Delegate (i.e. on top of MessageLoopForUI/ForIO).

This CL also removes RunLoop::Delegate::Client::IsNested() as it
was a mere shortcut for its TLS complement and had to switch to
using TLS itself to remain valid in override scenarios...
Ran base_perftests.exe --gtest_filter=*MessageLoop* in static/Release
and things look the same.

Bug: 708584
Change-Id: I143f6e6afb47de11f95702c337dbe63eb0887596
Reviewed-on: https://chromium-review.googlesource.com/784214
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521228}
[modify] https://crrev.com/1ef212bd9089eeef23b2e4692ff8a9ebed09c4ee/base/message_loop/message_loop.cc
[modify] https://crrev.com/1ef212bd9089eeef23b2e4692ff8a9ebed09c4ee/base/run_loop.cc
[modify] https://crrev.com/1ef212bd9089eeef23b2e4692ff8a9ebed09c4ee/base/run_loop.h
[modify] https://crrev.com/1ef212bd9089eeef23b2e4692ff8a9ebed09c4ee/base/run_loop_unittest.cc
[modify] https://crrev.com/1ef212bd9089eeef23b2e4692ff8a9ebed09c4ee/base/threading/thread_task_runner_handle.cc
[modify] https://crrev.com/1ef212bd9089eeef23b2e4692ff8a9ebed09c4ee/base/threading/thread_task_runner_handle.h

Comment 84 by bugdroid1@chromium.org, Dec 14 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a3ec9613d2386591660c570754b4bddd0c888a3b

commit a3ec9613d2386591660c570754b4bddd0c888a3b
Author: Gabriel Charette <gab@chromium.org>
Date: Thu Dec 14 17:22:40 2017

Replace RunLoop's Delegate::Client by a ShouldQuitWhenIdleCallback.

The Client interface was diluted down to a single method at this point.
Different implementations of overriding Delegate's Run() methods will
need different behaviors from ShouldQuitWhenIdle(). Making it easily
overrridable is key.

One such example behaviour is when overriding a MessageLoopForUI/IO.
When waiting inside a Run() with no more tasks, control needs to
remain in the hands of the overridden MessageLoop as it may receive
work first (from the system) and therefore shouldn't quit-when-idle
when the overriding Delegate is out of work (the overriding Delegate
can let it know to wake by posting a task to it if it gets work
first).

R=thestig@chromium.org

Bug: 708584
Change-Id: I27a449bc3be5858b0e8d4d6482714523ad5e2b67
Reviewed-on: https://chromium-review.googlesource.com/817962
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524097}
[modify] https://crrev.com/a3ec9613d2386591660c570754b4bddd0c888a3b/base/message_loop/message_loop.cc
[modify] https://crrev.com/a3ec9613d2386591660c570754b4bddd0c888a3b/base/message_loop/message_loop.h
[modify] https://crrev.com/a3ec9613d2386591660c570754b4bddd0c888a3b/base/run_loop.cc
[modify] https://crrev.com/a3ec9613d2386591660c570754b4bddd0c888a3b/base/run_loop.h
[modify] https://crrev.com/a3ec9613d2386591660c570754b4bddd0c888a3b/base/run_loop_unittest.cc
[modify] https://crrev.com/a3ec9613d2386591660c570754b4bddd0c888a3b/base/test/test_mock_time_task_runner.cc
[modify] https://crrev.com/a3ec9613d2386591660c570754b4bddd0c888a3b/base/test/test_mock_time_task_runner.h

Comment 85 by bugdroid1@chromium.org, Jan 3 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f9c93846970ae6ddd7b9cca352571bdd718ca43d

commit f9c93846970ae6ddd7b9cca352571bdd718ca43d
Author: Gabriel Charette <gab@chromium.org>
Date: Wed Jan 03 18:34:49 2018

Proper MessageLoop::IsIdleForTesting() that corresponds to the actual idleness criteria for MessageLoop.

A pre-requirement for a simpler ScopedTaskEnvironment::RunUntilIdle()
implementation.

R=fdoray@chromium.org

Bug: 708584
Change-Id: I6c35d72868ab313788c166c76e179c8cd3ace438
Reviewed-on: https://chromium-review.googlesource.com/847752
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526750}
[modify] https://crrev.com/f9c93846970ae6ddd7b9cca352571bdd718ca43d/base/message_loop/incoming_task_queue.cc
[modify] https://crrev.com/f9c93846970ae6ddd7b9cca352571bdd718ca43d/base/message_loop/incoming_task_queue.h
[modify] https://crrev.com/f9c93846970ae6ddd7b9cca352571bdd718ca43d/base/message_loop/message_loop.cc
[modify] https://crrev.com/f9c93846970ae6ddd7b9cca352571bdd718ca43d/base/message_loop/message_loop.h

Comment 86 by bugdroid1@chromium.org, Jan 3 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d97b059746c55e952089c08d0c40f46e02250005

commit d97b059746c55e952089c08d0c40f46e02250005
Author: Gabriel Charette <gab@chromium.org>
Date: Wed Jan 03 21:29:43 2018

Tweak STE::HasIncompleteUndelayedTasksForTesting() to provide side-effects visibility guarantees.

R=fdoray@chromium.org

Bug: 708584
Change-Id: I4a84351a3c4556f960628be140f1545208e02988
Reviewed-on: https://chromium-review.googlesource.com/847431
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526822}
[modify] https://crrev.com/d97b059746c55e952089c08d0c40f46e02250005/base/task_scheduler/task_tracker.cc
[modify] https://crrev.com/d97b059746c55e952089c08d0c40f46e02250005/base/task_scheduler/task_tracker.h
[modify] https://crrev.com/d97b059746c55e952089c08d0c40f46e02250005/base/test/scoped_task_environment.cc

Comment 87 by bugdroid1@chromium.org, Jan 7 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/28b418dcd520e68d1329c631e5494194baf1061a

commit 28b418dcd520e68d1329c631e5494194baf1061a
Author: Wez <wez@chromium.org>
Date: Sun Jan 07 00:40:09 2018

Revert "Proper MessageLoop::IsIdleForTesting() that corresponds to the actual idleness criteria for MessageLoop."

This reverts commit f9c93846970ae6ddd7b9cca352571bdd718ca43d.

Reason for revert: Changing the semantics of IsIdleForTesting() breaks the semantics expected by
many tests, in particular meaning that the result is (more) affected by timing, since ready-to-run
delayed tasks are now included in the calculation. This has introduced substantial flakiness to the
Fuchsia bots on the CQ/waterfall & FYI tree, since they run under emulation and so often enjoy
significant thread scheduling delays.

Original change's description:
> Proper MessageLoop::IsIdleForTesting() that corresponds to the actual idleness criteria for MessageLoop.
>
> A pre-requirement for a simpler ScopedTaskEnvironment::RunUntilIdle()
> implementation.
>
> R=​fdoray@chromium.org
>
> Bug: 708584
> Change-Id: I6c35d72868ab313788c166c76e179c8cd3ace438
> Reviewed-on: https://chromium-review.googlesource.com/847752
> Reviewed-by: François Doray <fdoray@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#526750}

TBR=gab@chromium.org,fdoray@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 708584
Change-Id: Ie051c747edb468c1a7b13f1f0c2b862b4052505e
Reviewed-on: https://chromium-review.googlesource.com/853091
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527529}
[modify] https://crrev.com/28b418dcd520e68d1329c631e5494194baf1061a/base/message_loop/incoming_task_queue.cc
[modify] https://crrev.com/28b418dcd520e68d1329c631e5494194baf1061a/base/message_loop/incoming_task_queue.h
[modify] https://crrev.com/28b418dcd520e68d1329c631e5494194baf1061a/base/message_loop/message_loop.cc
[modify] https://crrev.com/28b418dcd520e68d1329c631e5494194baf1061a/base/message_loop/message_loop.h

Comment 88 by bugdroid1@chromium.org, Jan 9 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f10a01613c39b87f076d0f25581b26dbb1fb127f

commit f10a01613c39b87f076d0f25581b26dbb1fb127f
Author: Gabriel Charette <gab@chromium.org>
Date: Tue Jan 09 23:31:40 2018

Reland "Proper MessageLoop::IsIdleForTesting() that corresponds to the actual idleness criteria for MessageLoop."

This is a reland of f9c93846970ae6ddd7b9cca352571bdd718ca43d
Reverted because of  https://crbug.com/799081 

Original change's description:
> Proper MessageLoop::IsIdleForTesting() that corresponds to the actual idleness criteria for MessageLoop.
>
> A pre-requirement for a simpler ScopedTaskEnvironment::RunUntilIdle()
> implementation.

In patchset 2 I initially considered still testing delayed_tasks() but without
using TimeTicks::Now().

But that doesn't work either because MessagePump round robs between DoWork() and
DoDelayedWork() and a condition met by the last task meant to be processed by
DoWork() could technically occur before all ready delayed tasks are processed
(regardless of flaky timing issues).

Patch set 3 explicitly ignores delayed_tasks(). Still much better than the previous check
which didn't even properly check the main work queue (ignored tasks already moved to
triage_task()..!).

ScopedTaskEnvironment::RunUntilIdle() could use the check in patch set 2 but it can't go in
without at least fixing base::Timer (which doesn't cancel its tasks when deleted and cause
delayed tasks to outlive their scope). In the meantime, we can add an explicit
MessageLoop::HasReadyDelayedTasks() check.

> R=fdoray@chromium.org
>
> Bug: 708584
> Change-Id: I6c35d72868ab313788c166c76e179c8cd3ace438
> Reviewed-on: https://chromium-review.googlesource.com/847752
> Reviewed-by: François Doray <fdoray@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#526750}

Bug: 708584
Change-Id: I72e0543578f0d6e4c8218d9eaebd33ca3d2f8e4a
Reviewed-on: https://chromium-review.googlesource.com/856982
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528163}
[modify] https://crrev.com/f10a01613c39b87f076d0f25581b26dbb1fb127f/base/message_loop/incoming_task_queue.cc
[modify] https://crrev.com/f10a01613c39b87f076d0f25581b26dbb1fb127f/base/message_loop/incoming_task_queue.h
[modify] https://crrev.com/f10a01613c39b87f076d0f25581b26dbb1fb127f/base/message_loop/message_loop.cc
[modify] https://crrev.com/f10a01613c39b87f076d0f25581b26dbb1fb127f/base/message_loop/message_loop.h

Comment 89 by bugdroid1@chromium.org, Jan 17 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/36df3a6bd78fdb1297ad662587997b5d6bed3c9d

commit 36df3a6bd78fdb1297ad662587997b5d6bed3c9d
Author: Gabriel Charette <gab@chromium.org>
Date: Wed Jan 17 15:54:25 2018

Mark IncomingTaskQueue::message_loop_scheduled_ after kicking it off.

Also grab the lock although it shouldn't yet be contended for good
measure and to be future proof.

I realized it also served the purpose of serializing ScheduleWork() calls
when trying to figure out how to implement ThreadController::ScheduleWork()
(ref. Blink/TaskScheduler merge and ScopedTaskEnvironment MOCK_TIME over
non-default MessageLoops). MessageLoop::ScheduleWork() itself is
documented as requiring mutually exclusive calls (and some
MessagePump::ScheduleWork() impls indeed require this per touching
non atomic state).

R=robliao@chromium.org

Bug: 708584,  783309 
Change-Id: Id6acb3176d23b8161b686f715c710646c27acfe5
Reviewed-on: https://chromium-review.googlesource.com/866836
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529753}
[modify] https://crrev.com/36df3a6bd78fdb1297ad662587997b5d6bed3c9d/base/message_loop/incoming_task_queue.cc
[modify] https://crrev.com/36df3a6bd78fdb1297ad662587997b5d6bed3c9d/base/message_loop/incoming_task_queue.h

Comment 90 by gab@chromium.org, Mar 5 2018

Blocking: 818653

Comment 91 by gab@chromium.org, Mar 13 2018

Blocking: 587199

Comment 92 by gab@chromium.org, Mar 13 2018

Blocking: 684640

Comment 93 by gab@chromium.org, Mar 22 2018

Blockedon: 824770

Comment 94 by bugdroid1@chromium.org, Apr 11 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9d8482ea5f05e07a5c1ab64b6a551a6e9b1cea20

commit 9d8482ea5f05e07a5c1ab64b6a551a6e9b1cea20
Author: Gabriel Charette <gab@chromium.org>
Date: Wed Apr 11 11:35:07 2018

Support FileDescriptorWatcher in ScopedTaskEnvironment::MainThreadType::IO

This is cleaner than having individual tests manage their own
FileDescriptorWatcher instances and it removes a few existing
usages of MessageLoopForIO::current() as a MessageLoopForIO* (which will
no longer be legal after : https://chromium-review.googlesource.com/c/chromium/src/+/957760).

R=fdoray@chromium.org
TBR=sergeyu@chromium.org (c/b/extensions/api/messaging side-effects)
TBR=hidehiko@chromium.org (components/arc cleanup)

Bug: 825327, 708584
Change-Id: I2c4507cc7a4af073afaf19cd3d802c3bb5fd7f39
Reviewed-on: https://chromium-review.googlesource.com/1005780
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549857}
[modify] https://crrev.com/9d8482ea5f05e07a5c1ab64b6a551a6e9b1cea20/base/files/file_descriptor_watcher_posix.h
[modify] https://crrev.com/9d8482ea5f05e07a5c1ab64b6a551a6e9b1cea20/base/test/scoped_task_environment.cc
[modify] https://crrev.com/9d8482ea5f05e07a5c1ab64b6a551a6e9b1cea20/base/test/scoped_task_environment.h
[modify] https://crrev.com/9d8482ea5f05e07a5c1ab64b6a551a6e9b1cea20/base/test/scoped_task_environment_unittest.cc
[modify] https://crrev.com/9d8482ea5f05e07a5c1ab64b6a551a6e9b1cea20/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
[modify] https://crrev.com/9d8482ea5f05e07a5c1ab64b6a551a6e9b1cea20/components/arc/timer/arc_timer_bridge_unittest.cc
[modify] https://crrev.com/9d8482ea5f05e07a5c1ab64b6a551a6e9b1cea20/content/public/test/test_browser_thread_bundle.h
[modify] https://crrev.com/9d8482ea5f05e07a5c1ab64b6a551a6e9b1cea20/remoting/host/local_input_monitor_unittest.cc

Comment 95 by bugdroid1@chromium.org, May 22 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/50518fc77cc0e960c20137a16406cd0d10056890

commit 50518fc77cc0e960c20137a16406cd0d10056890
Author: Gabriel Charette <gab@chromium.org>
Date: Tue May 22 17:53:22 2018

[RunLoop] Remove unused RunLoop::OverrideDelegateForCurrentThreadForTesting().

This is effectively a revert of r521228 while keeping the improvements
of r524097.

This was intended to be used to allow ScopedTaskEnvironment::MOCK_TIME
on top of MessageLoopForUI/ForIO but this turned out harder than
expected and we're now going with a different approach.

R=danakj@chromium.org

Bug: 708584
Change-Id: I6951ac7fc1bf6b6eac0f269e0dec9f677ea29543
Reviewed-on: https://chromium-review.googlesource.com/1066456
Reviewed-by: kylechar <kylechar@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560695}
[modify] https://crrev.com/50518fc77cc0e960c20137a16406cd0d10056890/base/run_loop.cc
[modify] https://crrev.com/50518fc77cc0e960c20137a16406cd0d10056890/base/run_loop.h
[modify] https://crrev.com/50518fc77cc0e960c20137a16406cd0d10056890/base/run_loop_unittest.cc
[modify] https://crrev.com/50518fc77cc0e960c20137a16406cd0d10056890/base/threading/thread_task_runner_handle.cc
[modify] https://crrev.com/50518fc77cc0e960c20137a16406cd0d10056890/base/threading/thread_task_runner_handle.h

Comment 96 by bugdroid1@chromium.org, Jun 1 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fbd4bb03d4b256caf3184508fc3b5c2231bc15b7

commit fbd4bb03d4b256caf3184508fc3b5c2231bc15b7
Author: Gabriel Charette <gab@chromium.org>
Date: Fri Jun 01 21:14:32 2018

[MessageLoop] Update high-res tasks comment in TriageQueue::ReloadFromIncomingQueueIfEmpty

This is part of a few precursor cleanups before moving this code to
MessageLoopTaskRunner (to split incoming task source logic from
IncomingTaskQueue and allow mocking the task source).

R=robliao@chromium.org

Bug: 708584
Change-Id: Ic35654fd4cc38a7d6cc52fe428a38b27ce108046
Reviewed-on: https://chromium-review.googlesource.com/1079248
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563797}
[modify] https://crrev.com/fbd4bb03d4b256caf3184508fc3b5c2231bc15b7/base/message_loop/incoming_task_queue.cc

Comment 97 by bugdroid1@chromium.org, Jun 1 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3919aa1b42669eadec4a8489c834edb710ea68c9

commit 3919aa1b42669eadec4a8489c834edb710ea68c9
Author: Gabriel Charette <gab@chromium.org>
Date: Fri Jun 01 22:55:42 2018

[MessageLoop] Clear all pending tasks in TriageQueue::Clear

This is a precursor to moving the |incoming_queue_| multi-threaded part
of IncomingTaskQueue to MessageLoopTaskRunner to allow mocking the
source of incoming tasks (i.e. for ScopedTaskEnvironment::MOCK_TIME on
top of MLForUI/etc.).

Such an interface will not have a notion of pre-triaged versus
still-on-multi-threaded-queue tasks. What matters here is that
TriageQueue::Clear() doesn't get stuck in a loop, the new logic clears
all pending tasks while still backing out if destructors post more
tasks.

R=danakj@chromium.org, kylechar@chromium.org

Bug: 708584
Change-Id: I8cd4f244718e4f5f74d5cb84138083ee37833238
Reviewed-on: https://chromium-review.googlesource.com/1078932
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563846}
[modify] https://crrev.com/3919aa1b42669eadec4a8489c834edb710ea68c9/base/message_loop/incoming_task_queue.cc
[modify] https://crrev.com/3919aa1b42669eadec4a8489c834edb710ea68c9/base/message_loop/incoming_task_queue.h
[modify] https://crrev.com/3919aa1b42669eadec4a8489c834edb710ea68c9/base/message_loop/message_loop_unittest.cc

Comment 98 by bugdroid1@chromium.org, Jun 19 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6a1da98dc56f11d5abb93a9762b705b76c879e05

commit 6a1da98dc56f11d5abb93a9762b705b76c879e05
Author: Gabriel Charette <gab@chromium.org>
Date: Tue Jun 19 20:14:54 2018

[MessageLoop] Only count tasks actually in the DelayedQueue as pending hi-res tasks.

This count only matters when reaching MessageLoop::DoIdleWork() at
which point the TriageQueue is empty by definition (and tasks in the
DeferredQueue do not matter). This CL is therefore a no-op behavior
wise.

In an upcoming change, the thread-safe |incoming_queue_| will move to
MessageLoopTaskRunner and dropping unecessary hi-res counts now will
make this transition simpler.

This also allows disconnecting DelayedQueue and DeferredQueue from their
outer class.

R=danakj@chromium.org, kylechar@chromium.org

Bug: 708584,  854237 
Change-Id: Icf36f1e425a8320fb14a4c561c529a9ea2389e0f
Reviewed-on: https://chromium-review.googlesource.com/1103120
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568586}
[modify] https://crrev.com/6a1da98dc56f11d5abb93a9762b705b76c879e05/base/message_loop/incoming_task_queue.cc
[modify] https://crrev.com/6a1da98dc56f11d5abb93a9762b705b76c879e05/base/message_loop/incoming_task_queue.h

Comment 99 by gab@chromium.org, Jul 4 2018

Blockedon: 860252

Comment 100 by bugdroid1@chromium.org, Jul 27 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/02b1cd6abe987473248a3454a51efc5aefda0637

commit 02b1cd6abe987473248a3454a51efc5aefda0637
Author: Gabriel Charette <gab@chromium.org>
Date: Fri Jul 27 21:37:08 2018

[MessageLoop] MessageLoopTaskRunner as multi-threaded incoming queue.

Introduces the SequencedTaskSource interface to //base. This should ultimately
be coalesced with a similar interface used by SequenceManager but this CL was
complex enough in isolation that it was easier to introduce only the basic API
for now.

MessageLoop will as a follow-up expose an API that will allow it to be created
with a custom SequencedTaskSource. This will enable
ScopedTaskEnvironment::MOCK_TIME on custom MessageLoops (i.e. ForUI/ForIO) and
soon after on all threads (not just main thread), since TaskScheduler's delayed
tasks are managed on a MessageLoopForIO. Finally this will allow MOCK_TIME on
TestBrowserThreadBundle (which uses a MessageLoopForUI); nicely rounding out the
MOCK_TIME APIs.

In this CL the following semantics have changed in MessageLoop :
 * MessageLoop::unbound_task_runner_ ->
    - MessageLoop::underlying_task_runner_
    - MessageLoop::task_runner_ still initially set to it
    - but now const to clarify lifetime (and not set to null in
      ~MessageLoop() as this was pointless)
    - Implements SequencedTaskSource
    - Now has a Shutdown() phase so that PostTask() that happen-after
      ~MessageLoop() returns false
      (MessageLoop::Controller::DisconnectFromParent() still required,
      see comment in ~MessageLoop())
 * IncomingTaskQueue (to be renamed to PendingTaskQueue in follow-up) :
    - no longer has a TriageQueue (MessageLoop communicates directly with
      SequencedTaskSource)
    - no longer ref-counted, strictly a member of MessageLoop
    - MessageLoop uses it as storage for tasks it must delay/defer
    - IncomingTaskQueue no longer has a Shutdown() phase, becomes
      dead storage on shutdown and dies with MessageLoop
    - Racy PostTask() on shutdown are now strictly handled between
      MessageLoop and its Controller
 * SequencedTaskSource :
    - the interface MessageLoop feeds from, initially only
      implemented by MessageLoopTaskRunner but will be made customizable
      as a follow-up
 * MessageLoop::SetTaskRunner()
    - still a thing to keep existing use cases alive but will ultimately
      die in favor of providing an external SequencedTaskSource (and
      killing all MessageLoop task_runner dances performed today :))


Note: most new logic in message_loop_task_runner.cc was moved as-is from
incoming_task_queue.cc

Bug: 708584,  860252 
Change-Id: I23f40d293d2df6fe41374fad127745f2ff72fbe0
Reviewed-on: https://chromium-review.googlesource.com/1088762
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578809}
[modify] https://crrev.com/02b1cd6abe987473248a3454a51efc5aefda0637/base/BUILD.gn
[modify] https://crrev.com/02b1cd6abe987473248a3454a51efc5aefda0637/base/message_loop/incoming_task_queue.cc
[modify] https://crrev.com/02b1cd6abe987473248a3454a51efc5aefda0637/base/message_loop/incoming_task_queue.h
[modify] https://crrev.com/02b1cd6abe987473248a3454a51efc5aefda0637/base/message_loop/message_loop.cc
[modify] https://crrev.com/02b1cd6abe987473248a3454a51efc5aefda0637/base/message_loop/message_loop.h
[modify] https://crrev.com/02b1cd6abe987473248a3454a51efc5aefda0637/base/message_loop/message_loop_task_runner.cc
[modify] https://crrev.com/02b1cd6abe987473248a3454a51efc5aefda0637/base/message_loop/message_loop_task_runner.h
[modify] https://crrev.com/02b1cd6abe987473248a3454a51efc5aefda0637/base/message_loop/message_loop_task_runner_perftest.cc
[add] https://crrev.com/02b1cd6abe987473248a3454a51efc5aefda0637/base/message_loop/sequenced_task_source.h

Comment 102 by bugdroid1@chromium.org, Sep 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cb1307942412845a488916cf70a000baeb4f7713

commit cb1307942412845a488916cf70a000baeb4f7713
Author: Gabriel Charette <gab@chromium.org>
Date: Wed Sep 19 19:56:52 2018

[MessageLoop tests] Remove obsolete WITH_TASK_SCHEDULER variant

That variant was useful in the early days of TaskScheduler to ensure
compatibility. It is now in the way as other variants of MessageLoop
are being considered. MessageLoop is independent from TaskScheduler
and the integration is now well-covered implicitly by the vast majority
of tests in the codebase.

R=fdoray@chromium.org

Bug: 708584
Change-Id: Id93d8eb4f970e0aa0e1915ffcbc7471190e3d312
Reviewed-on: https://chromium-review.googlesource.com/1232573
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592528}
[modify] https://crrev.com/cb1307942412845a488916cf70a000baeb4f7713/base/message_loop/message_loop_unittest.cc

Comment 103 by gab@chromium.org, Nov 14

Blocking: 905412

Comment 104 by bugdroid1@chromium.org, Nov 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/43847232a20919639d2f38fcbf248d777d6b8a56

commit 43847232a20919639d2f38fcbf248d777d6b8a56
Author: Gabriel Charette <gab@chromium.org>
Date: Fri Nov 16 14:42:38 2018

[ScopedTaskEnvironment] Enable MTA in unit test thread pools

This is a prereq for
https://chromium-review.googlesource.com/c/chromium/src/+/1338221
without this change, the MTA assertions fail in unit tests even though
they are correct in prod.

This change matches the browser process' params @
content/browser/startup_helper.cc

It has the adverse side-effect however of enabling the MTA in renderer
unit tests but the downside there is not as bad as it just means some
COM asserts may pass in unit tests where they wouldn't in integration
tests or prod. I think that's okay because unit tests are already
generally very loose on allowing I/O, waits, etc. Misuse will still be
caught, but that's just not unit tests' main role.

R=fdoray@chromium.org

Bug: 708584,  707362 
Change-Id: I68c5e41c24396885af43427d09c11e1e84ecea43
Reviewed-on: https://chromium-review.googlesource.com/c/1338305
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608772}
[modify] https://crrev.com/43847232a20919639d2f38fcbf248d777d6b8a56/base/test/scoped_task_environment.cc
[modify] https://crrev.com/43847232a20919639d2f38fcbf248d777d6b8a56/base/test/scoped_task_environment_unittest.cc

Comment 105 by gab@chromium.org, Nov 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b7b1fc005998a4209e8979081305608e8e85c8ed

commit b7b1fc005998a4209e8979081305608e8e85c8ed
Author: Alex Clarke <alexclarke@chromium.org>
Date: Thu Nov 22 09:11:24 2018

Add some new ScopedTaskEnvironment tests

Bug: 863341, 891670
Change-Id: If583048e9efcc14ab1456153480d1ab2847eb869
Reviewed-on: https://chromium-review.googlesource.com/c/1347271
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610354}
[modify] https://crrev.com/b7b1fc005998a4209e8979081305608e8e85c8ed/base/test/scoped_task_environment_unittest.cc

Comment 106 by bugdroid1@chromium.org, Nov 28

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/514c49d40b386bd0fc3e544257ef2ec13e458028

commit 514c49d40b386bd0fc3e544257ef2ec13e458028
Author: Alex Clarke <alexclarke@chromium.org>
Date: Wed Nov 28 22:21:14 2018

Use the SequenceManager in ScopedTaskEnvironment

This is necessary because we want content::TestBrowserThreadBundle to
own a BrowserUIThreadScheduler, but that also owns a ScopedTaskEnvironment
and you can't have two SequenceManagers on the same thread.

This patch allows ScopedTaskEnvironment to optionally work with an
externally owned SequenceManager solving the problem.

This implements https://docs.google.com/document/d/1y08C6JQ9Yta3EQXzwIqqIIKHq9500WV6CWFZzZfDx7I/edit?usp=drivesdk,

We now have the ability to mock time on the UI thread.

TBR=asvitkine@chromium.org,miu@chromium.org

Bug: 863341, 891670, 708584
Change-Id: I96aa34c5cc8832c263621c2d9c228a8da4372c68
Reviewed-on: https://chromium-review.googlesource.com/c/1324391
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611895}
[modify] https://crrev.com/514c49d40b386bd0fc3e544257ef2ec13e458028/base/message_loop/message_pump_mac.mm
[modify] https://crrev.com/514c49d40b386bd0fc3e544257ef2ec13e458028/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc
[modify] https://crrev.com/514c49d40b386bd0fc3e544257ef2ec13e458028/base/test/scoped_task_environment.cc
[modify] https://crrev.com/514c49d40b386bd0fc3e544257ef2ec13e458028/base/test/scoped_task_environment.h
[modify] https://crrev.com/514c49d40b386bd0fc3e544257ef2ec13e458028/base/test/scoped_task_environment_unittest.cc
[modify] https://crrev.com/514c49d40b386bd0fc3e544257ef2ec13e458028/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
[modify] https://crrev.com/514c49d40b386bd0fc3e544257ef2ec13e458028/content/renderer/media/stream/webmediaplayer_ms_unittest.cc

Comment 107 by bugdroid1@chromium.org, Nov 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d28e2536ab6b8ee546a24d0041377b0a05705c7c

commit d28e2536ab6b8ee546a24d0041377b0a05705c7c
Author: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Date: Thu Nov 29 03:58:13 2018

Revert "Use the SequenceManager in ScopedTaskEnvironment"

This reverts commit 514c49d40b386bd0fc3e544257ef2ec13e458028.

Reason for revert: Breaks test on Mac10.12 Tests

https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac10.12%20Tests/17139

[ RUN      ] WebMediaPlayerMSTest.RotationChange/3
../../content/renderer/media/stream/webmediaplayer_ms_unittest.cc:1136: Failure
Expected equality of these values:
  kStandardHeight
    Which is: 240
  natural_size.height
    Which is: 320
Stack trace:
0   content_unittests                   0x00000001030aac4b testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop(int) + 91
1   content_unittests                   0x00000001030aa609 testing::internal::AssertHelper::operator=(testing::Message const&) const + 89
2   content_unittests                   0x0000000102314244 content::WebMediaPlayerMSTest_RotationChange_Test::TestBody() + 3492


Original change's description:
> Use the SequenceManager in ScopedTaskEnvironment
> 
> This is necessary because we want content::TestBrowserThreadBundle to
> own a BrowserUIThreadScheduler, but that also owns a ScopedTaskEnvironment
> and you can't have two SequenceManagers on the same thread.
> 
> This patch allows ScopedTaskEnvironment to optionally work with an
> externally owned SequenceManager solving the problem.
> 
> This implements https://docs.google.com/document/d/1y08C6JQ9Yta3EQXzwIqqIIKHq9500WV6CWFZzZfDx7I/edit?usp=drivesdk,
> 
> We now have the ability to mock time on the UI thread.
> 
> TBR=asvitkine@chromium.org,miu@chromium.org
> 
> Bug: 863341, 891670, 708584
> Change-Id: I96aa34c5cc8832c263621c2d9c228a8da4372c68
> Reviewed-on: https://chromium-review.googlesource.com/c/1324391
> Commit-Queue: Alex Clarke <alexclarke@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: François Doray <fdoray@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#611895}

TBR=gab@chromium.org,fdoray@chromium.org,alexclarke@chromium.org

Change-Id: I4b4922b5f393bcb9aace5f28b09a61fbdf2bfa04
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 863341, 891670, 708584
Reviewed-on: https://chromium-review.googlesource.com/c/1354723
Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612026}
[modify] https://crrev.com/d28e2536ab6b8ee546a24d0041377b0a05705c7c/base/message_loop/message_pump_mac.mm
[modify] https://crrev.com/d28e2536ab6b8ee546a24d0041377b0a05705c7c/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc
[modify] https://crrev.com/d28e2536ab6b8ee546a24d0041377b0a05705c7c/base/test/scoped_task_environment.cc
[modify] https://crrev.com/d28e2536ab6b8ee546a24d0041377b0a05705c7c/base/test/scoped_task_environment.h
[modify] https://crrev.com/d28e2536ab6b8ee546a24d0041377b0a05705c7c/base/test/scoped_task_environment_unittest.cc
[modify] https://crrev.com/d28e2536ab6b8ee546a24d0041377b0a05705c7c/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
[modify] https://crrev.com/d28e2536ab6b8ee546a24d0041377b0a05705c7c/content/renderer/media/stream/webmediaplayer_ms_unittest.cc

Comment 108 by bugdroid1@chromium.org, Nov 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/49c8774b77a9c530447f805dbb5358092cfa28e1

commit 49c8774b77a9c530447f805dbb5358092cfa28e1
Author: Alex Clarke <alexclarke@chromium.org>
Date: Thu Nov 29 09:59:57 2018

[Reland] Use the SequenceManager in ScopedTaskEnvironment

A reland of https://crrev.com/c/1324391

This is necessary because we want content::TestBrowserThreadBundle to
own a BrowserUIThreadScheduler, but that also owns a ScopedTaskEnvironment
and you can't have two SequenceManagers on the same thread.

This patch allows ScopedTaskEnvironment to optionally work with an
externally owned SequenceManager solving the problem.

This implements https://docs.google.com/document/d/1y08C6JQ9Yta3EQXzwIqqIIKHq9500WV6CWFZzZfDx7I/edit?usp=drivesdk,

We now have the ability to mock time on the UI thread.

TBR=asvitkine@chromium.org,miu@chromium.org,gab@chromium.org,fdoray@chromium.org

Bug: 863341, 891670, 708584
Change-Id: Ia4409b885deb9935e6e5b6d99f4598f164d350db
Reviewed-on: https://chromium-review.googlesource.com/c/1354919
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612122}
[modify] https://crrev.com/49c8774b77a9c530447f805dbb5358092cfa28e1/base/message_loop/message_pump_mac.mm
[modify] https://crrev.com/49c8774b77a9c530447f805dbb5358092cfa28e1/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc
[modify] https://crrev.com/49c8774b77a9c530447f805dbb5358092cfa28e1/base/test/scoped_task_environment.cc
[modify] https://crrev.com/49c8774b77a9c530447f805dbb5358092cfa28e1/base/test/scoped_task_environment.h
[modify] https://crrev.com/49c8774b77a9c530447f805dbb5358092cfa28e1/base/test/scoped_task_environment_unittest.cc
[modify] https://crrev.com/49c8774b77a9c530447f805dbb5358092cfa28e1/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
[modify] https://crrev.com/49c8774b77a9c530447f805dbb5358092cfa28e1/content/renderer/media/stream/webmediaplayer_ms_unittest.cc

Comment 109 by bugdroid1@chromium.org, Nov 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b54920b5ce0b28a83cf343b94d78c672d12a2645

commit b54920b5ce0b28a83cf343b94d78c672d12a2645
Author: Wez <wez@chromium.org>
Date: Fri Nov 30 20:04:13 2018

Revert "[Reland] Use the SequenceManager in ScopedTaskEnvironment"

This reverts commit 49c8774b77a9c530447f805dbb5358092cfa28e1.

Reason for revert: CL seems likely cause of a new MainThreadHasPendingTasks() flake observed on the Fuchsia builders (see  crbug.com/910645 ).

Original change's description:
> [Reland] Use the SequenceManager in ScopedTaskEnvironment
> 
> A reland of https://crrev.com/c/1324391
> 
> This is necessary because we want content::TestBrowserThreadBundle to
> own a BrowserUIThreadScheduler, but that also owns a ScopedTaskEnvironment
> and you can't have two SequenceManagers on the same thread.
> 
> This patch allows ScopedTaskEnvironment to optionally work with an
> externally owned SequenceManager solving the problem.
> 
> This implements https://docs.google.com/document/d/1y08C6JQ9Yta3EQXzwIqqIIKHq9500WV6CWFZzZfDx7I/edit?usp=drivesdk,
> 
> We now have the ability to mock time on the UI thread.
> 
> TBR=asvitkine@chromium.org,miu@chromium.org,gab@chromium.org,fdoray@chromium.org
> 
> Bug: 863341, 891670, 708584
> Change-Id: Ia4409b885deb9935e6e5b6d99f4598f164d350db
> Reviewed-on: https://chromium-review.googlesource.com/c/1354919
> Reviewed-by: Alex Clarke <alexclarke@chromium.org>
> Commit-Queue: Alex Clarke <alexclarke@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#612122}

TBR=gab@chromium.org,miu@chromium.org,fdoray@chromium.org,asvitkine@chromium.org,alexclarke@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  910645 , 863341, 891670, 708584
Change-Id: I395322743c110f9b1dd424434756f05b2301a45b
Reviewed-on: https://chromium-review.googlesource.com/c/1357014
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612741}
[modify] https://crrev.com/b54920b5ce0b28a83cf343b94d78c672d12a2645/base/message_loop/message_pump_mac.mm
[modify] https://crrev.com/b54920b5ce0b28a83cf343b94d78c672d12a2645/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc
[modify] https://crrev.com/b54920b5ce0b28a83cf343b94d78c672d12a2645/base/test/scoped_task_environment.cc
[modify] https://crrev.com/b54920b5ce0b28a83cf343b94d78c672d12a2645/base/test/scoped_task_environment.h
[modify] https://crrev.com/b54920b5ce0b28a83cf343b94d78c672d12a2645/base/test/scoped_task_environment_unittest.cc
[modify] https://crrev.com/b54920b5ce0b28a83cf343b94d78c672d12a2645/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
[modify] https://crrev.com/b54920b5ce0b28a83cf343b94d78c672d12a2645/content/renderer/media/stream/webmediaplayer_ms_unittest.cc

Comment 110 by bugdroid1@chromium.org, Dec 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d1317fc30ce4e9ef08c5197c0f67767dfe585df4

commit d1317fc30ce4e9ef08c5197c0f67767dfe585df4
Author: Alex Clarke <alexclarke@chromium.org>
Date: Tue Dec 11 12:19:20 2018

[Reland #3] Use the SequenceManager in ScopedTaskEnvironment

A reland of https://crrev.com/c/1324391

This is necessary because we want content::TestBrowserThreadBundle to
own a BrowserUIThreadScheduler, but that also owns a ScopedTaskEnvironment
and you can't have two SequenceManagers on the same thread.

This patch allows ScopedTaskEnvironment to optionally work with an
externally owned SequenceManager solving the problem.

This implements https://docs.google.com/document/d/1y08C6JQ9Yta3EQXzwIqqIIKHq9500WV6CWFZzZfDx7I/edit?usp=drivesdk,

We now have the ability to mock time on the UI and IO threads.

RE HttpServiceTest change HttpServiceTest.MultipleRequests was failing
mysteriously on fuschia on the bots only (not locally). IO_MOCK_TIME seems
to have fixed this.


TBR=gab@chromium.org,fdoray@chromium.org,wez@chromium.org

Bug: 863341, 891670, 708584
Change-Id: I95444a0a50f8b577c5fae62c12c8423c7e8f21d6
Reviewed-on: https://chromium-review.googlesource.com/c/1361863
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615496}
[modify] https://crrev.com/d1317fc30ce4e9ef08c5197c0f67767dfe585df4/base/test/scoped_task_environment.cc
[modify] https://crrev.com/d1317fc30ce4e9ef08c5197c0f67767dfe585df4/base/test/scoped_task_environment.h
[modify] https://crrev.com/d1317fc30ce4e9ef08c5197c0f67767dfe585df4/base/test/scoped_task_environment_unittest.cc
[modify] https://crrev.com/d1317fc30ce4e9ef08c5197c0f67767dfe585df4/webrunner/net_http/http_service_unittest.cc

Comment 111 by bugdroid1@chromium.org, Dec 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b1525775f8eb45cd60230ff8329e99167011d979

commit b1525775f8eb45cd60230ff8329e99167011d979
Author: Friedrich Horschig [CET] <fhorschig@chromium.org>
Date: Tue Dec 11 14:45:00 2018

Revert "[Reland #3] Use the SequenceManager in ScopedTaskEnvironment"

This reverts commit d1317fc30ce4e9ef08c5197c0f67767dfe585df4.

Reason for revert: SyncSchedulerImplTest is failing and this is the most likely culprit. More information in the linked bug.

Bug: 913946

Original change's description:
> [Reland #3] Use the SequenceManager in ScopedTaskEnvironment
> 
> A reland of https://crrev.com/c/1324391
> 
> This is necessary because we want content::TestBrowserThreadBundle to
> own a BrowserUIThreadScheduler, but that also owns a ScopedTaskEnvironment
> and you can't have two SequenceManagers on the same thread.
> 
> This patch allows ScopedTaskEnvironment to optionally work with an
> externally owned SequenceManager solving the problem.
> 
> This implements https://docs.google.com/document/d/1y08C6JQ9Yta3EQXzwIqqIIKHq9500WV6CWFZzZfDx7I/edit?usp=drivesdk,
> 
> We now have the ability to mock time on the UI and IO threads.
> 
> RE HttpServiceTest change HttpServiceTest.MultipleRequests was failing
> mysteriously on fuschia on the bots only (not locally). IO_MOCK_TIME seems
> to have fixed this.
> 
> 
> TBR=gab@chromium.org,fdoray@chromium.org,wez@chromium.org
> 
> Bug: 863341, 891670, 708584
> Change-Id: I95444a0a50f8b577c5fae62c12c8423c7e8f21d6
> Reviewed-on: https://chromium-review.googlesource.com/c/1361863
> Commit-Queue: Alex Clarke <alexclarke@chromium.org>
> Reviewed-by: Alex Clarke <alexclarke@chromium.org>
> Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#615496}

TBR=wez@chromium.org,gab@chromium.org,fdoray@chromium.org,skyostil@chromium.org,alexclarke@chromium.org

Change-Id: If5ff0362758b5270eb3113d2fd6eeeb7facc37c3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 863341, 891670, 708584
Reviewed-on: https://chromium-review.googlesource.com/c/1371811
Reviewed-by: Friedrich Horschig [CET] <fhorschig@chromium.org>
Commit-Queue: Friedrich Horschig [CET] <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615520}
[modify] https://crrev.com/b1525775f8eb45cd60230ff8329e99167011d979/base/test/scoped_task_environment.cc
[modify] https://crrev.com/b1525775f8eb45cd60230ff8329e99167011d979/base/test/scoped_task_environment.h
[modify] https://crrev.com/b1525775f8eb45cd60230ff8329e99167011d979/base/test/scoped_task_environment_unittest.cc
[modify] https://crrev.com/b1525775f8eb45cd60230ff8329e99167011d979/webrunner/net_http/http_service_unittest.cc
Showing comments 12 - 111 of 111 Older

Sign in to add a comment