[TaskEnvironment] Mass-migrate away from ScopedTaskEnvironment
(second half of https://chromium-review.googlesource.com/c/chromium/src/+/1756247) This is step #1 of the mass migration. Some of these will be backported to SingleThreadTaskEnvironment in a later phase. scoped_task_environment.h will also only move in a follow-up CL. TBR=dcheng@chromium.org Bug: 992483 Change-Id: Ie80f083eeeb209180ab3c2884f1b566f73549cc6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756248 Reviewed-by: Gabriel Charette <gab@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#688142}
This commit is contained in:

committed by
Commit Bot

parent
855f22bd33
commit
dfa3604eca
PRESUBMIT.pytimer_test.cc
android_webview
browser
aw_content_browser_client_unittest.ccaw_form_database_service_unittest.ccaw_metrics_service_client_unittest.cc
network_service
safe_browsing
javatests
src
org
chromium
android_webview
base/util/memory_pressure
chrome/browser
notifications
scheduler
internal
ui
views
components
arc
power
session
wake_lock
assist_ranker
autofill
content
core
browser
address_normalizer_impl_unittest.ccautocomplete_history_manager_unittest.ccautofill_assistant_unittest.ccautofill_download_manager_unittest.ccautofill_driver_factory_unittest.ccautofill_external_delegate_unittest.ccautofill_manager_unittest.ccautofill_merge_unittest.ccautofill_metrics_unittest.ccautofill_profile_validator_unittest.ccfield_filler_unittest.ccform_data_importer_unittest.cc
geo
payments
autofill_wallet_data_type_controller_unittest.cccredit_card_access_manager_unittest.cccredit_card_cvc_authenticator_unittest.cccredit_card_fido_authenticator_unittest.cccredit_card_save_manager_unittest.ccfull_card_request_unittest.cclocal_card_migration_manager_unittest.ccpayments_client_unittest.ccstrike_database_integrator_test_strike_database_unittest.ccstrike_database_unittest.cc
personal_data_manager_unittest.ccwebdata
common
autofill_assistant
browser
blacklist
opt_out_blacklist
bookmarks
browser
bookmark_expanded_state_tracker_unittest.ccbookmark_model_unittest.ccbookmark_node_data_unittest.ccbookmark_utils_unittest.cc
managed
browser_watcher
browsing_data
core
captive_portal
cast_channel
certificate_transparency
chromeos_camera
component_updater
consent_auditor
content_capture
content_settings
core
browser
crash
content
cronet
host_cache_persistence_manager_unittest.cc
native
stale_host_resolver_unittest.ccurl_request_context_config_unittest.ccdata_reduction_proxy
content
browser
common
core
browser
data_reduction_proxy_compression_stats_unittest.ccdata_reduction_proxy_config_service_client_unittest.ccdata_reduction_proxy_config_unittest.ccdata_reduction_proxy_configurator_unittest.ccdata_reduction_proxy_data_unittest.ccdata_reduction_proxy_request_options_unittest.ccdata_reduction_proxy_service_unittest.ccdata_reduction_proxy_settings_unittest.ccnetwork_properties_manager_unittest.ccwarmup_url_fetcher_unittest.cc
discardable_memory
dom_distiller
core
domain_reliability
download
internal
drive
exo
favicon
feature_engagement
internal
feed
content
core
gcm_driver
account_tracker_unittest.cc
crypto
gcm_account_tracker_unittest.ccgcm_channel_status_request_unittest.ccgcm_client_impl_unittest.ccgcm_driver_desktop_unittest.ccgcm_driver_unittest.ccinstance_id
history
core
image_fetcher
core
cache
cached_image_fetcher_unittest.ccimage_data_fetcher_unittest.ccimage_fetcher_impl_unittest.ccreduced_mode_image_fetcher_unittest.ccios
invalidation
impl
fcm_invalidation_listener_unittest.ccfcm_invalidation_service_unittest.ccfcm_network_handler_unittests.ccgcm_invalidation_bridge_unittest.ccgcm_network_channel_unittest.ccinvalidation_notifier_unittest.ccnon_blocking_invalidator_unittest.ccper_user_topic_registration_manager_unittest.ccper_user_topic_registration_request_unittest.ccregistration_manager_unittest.ccsync_invalidation_listener_unittest.ccsync_system_resources_unittest.ccticl_invalidation_service_unittest.cc
language
leveldb_proto
internal
media_message_center
metrics
mirroring
browser
service
nacl
net_log
network_time
ntp_snippets
ntp_tiles
custom_links_manager_impl_unittest.ccicon_cacher_impl_unittest.ccmost_visited_sites_unittest.ccpopular_sites_impl_unittest.cc
offline_pages
omnibox
browser
autocomplete_provider_unittest.ccautocomplete_result_unittest.ccbase_search_provider_unittest.ccdocument_suggestions_service_unittest.ccfake_autocomplete_provider_client.ccfake_autocomplete_provider_client.hhistory_provider_unittest.cchistory_quick_provider_performance_unittest.cchistory_quick_provider_unittest.cchistory_url_provider_unittest.ccin_memory_url_index_unittest.cckeyword_provider_unittest.cclocation_bar_model_impl_unittest.ccomnibox_controller_unittest.ccomnibox_edit_model_unittest.ccomnibox_pedal_implementations_unittest.ccomnibox_popup_model_unittest.ccomnibox_view_unittest.ccon_device_head_provider_unittest.ccshortcuts_backend_unittest.ccshortcuts_provider_unittest.cczero_suggest_provider_unittest.cc
optimization_guide
os_crypt
page_image_annotation
password_manager
core
browser
android_affiliation
affiliated_match_helper_unittest.ccaffiliation_backend_unittest.ccaffiliation_fetch_throttler_unittest.ccaffiliation_fetcher_unittest.ccaffiliation_service_unittest.cc
blacklisted_credentials_cleaner_unittest.cccredential_manager_impl_unittest.cccredential_manager_password_form_manager_unittest.ccexport
form_fetcher_impl_unittest.ccform_saver_impl_unittest.ccgeneration
hsts_query_unittest.cchttp_auth_manager_unittest.cchttp_credentials_cleaner_unittest.cchttp_password_store_migrator_unittest.ccimport
leak_detection
authenticated_leak_check_unittest.ccleak_detection_check_factory_impl_unittest.ccleak_detection_request_unittest.ccleak_detection_request_utils_unittest.cc
login_database_ios_unittest.cclogin_database_unittest.ccpassword_autofill_manager_unittest.ccpassword_form_manager_unittest.ccpassword_form_metrics_recorder_unittest.ccpassword_generation_frame_helper_unittest.ccpassword_generation_state_unittest.ccpassword_manager_metrics_recorder_unittest.ccpassword_manager_onboarding_unittest.ccpassword_manager_unittest.ccpassword_reuse_detection_manager_unittest.ccpassword_store_default_unittest.ccpassword_store_unittest.ccsync
sync_username_test_base.hvotes_uploader_unittest.cccommon
payments
core
policy
core
browser
common
async_policy_provider_unittest.cc
cloud
cloud_policy_client_unittest.cccloud_policy_core_unittest.cccloud_policy_manager_unittest.cccloud_policy_refresh_scheduler_unittest.cccloud_policy_validator_unittest.cccomponent_cloud_policy_service_unittest.cccomponent_cloud_policy_updater_unittest.ccdevice_management_service_unittest.ccexternal_policy_data_fetcher_unittest.ccexternal_policy_data_updater_unittest.ccmachine_level_user_cloud_policy_store_unittest.ccresource_cache_unittest.ccuser_cloud_policy_manager_unittest.ccuser_cloud_policy_store_unittest.ccuser_info_fetcher_unittest.cc
config_dir_policy_loader_unittest.ccconfiguration_policy_provider_test.ccconfiguration_policy_provider_test.hpolicy_loader_mac_unittest.ccpolicy_loader_win_unittest.ccpolicy_scheduler_unittest.ccpolicy_service_impl_unittest.ccprefs
in_memory_pref_store_unittest.ccjson_pref_store_unittest.ccoverlay_user_pref_store_unittest.ccpersistent_pref_store_unittest.ccpersistent_pref_store_unittest.hpref_member_unittest.cc
previews
content
previews_decider_impl_unittest.ccpreviews_hints_unittest.ccpreviews_optimization_guide_unittest.ccpreviews_ui_service_unittest.cc
core
proxy_config
rappor
reading_list
rlz
safe_browsing
safe_search_api
safe_search
search_provider_logos
send_tab_to_self
services
filesystem
font
leveldb
pdf_compositor
quarantine
unzip
public
signin
core
browser
internal
identity_manager
account_tracker_service_unittest.ccgaia_cookie_manager_service_unittest.ccmutable_profile_oauth2_token_service_delegate_unittest.ccoauth_multilogin_helper_unittest.ccoauth_multilogin_token_fetcher_unittest.ccprimary_account_manager_unittest.ccprimary_account_policy_manager_impl_unittest.ccprofile_oauth2_token_service_delegate_chromeos_unittest.ccprofile_oauth2_token_service_delegate_ios_unittest.mmprofile_oauth2_token_service_unittest.ccubertoken_fetcher_impl_unittest.cc
ios
public
identity_manager
access_token_fetcher_unittest.ccaccounts_cookie_mutator_unittest.ccaccounts_mutator_unittest.ccdiagnostics_provider_unittest.ccidentity_manager_unittest.ccidentity_test_environment.ccidentity_test_environment.hidentity_test_environment_unittest.ccprimary_account_access_token_fetcher_unittest.ccprimary_account_mutator_unittest.cc
spellcheck
browser
spellcheck_host_metrics_unittest.ccspellcheck_platform_mac_unittest.ccspellcheck_platform_win_unittest.cc
renderer
ssl_errors
storage_monitor
subresource_filter
suggestions
sync
base
bind_to_task_runner_unittest.cccancelation_signal_unittest.ccsync_prefs_unittest.ccweak_handle_unittest.cc
driver
async_directory_type_controller_unittest.ccbackend_migrator_unittest.ccdata_type_manager_impl_unittest.ccfrontend_data_type_controller_unittest.ccgeneric_change_processor_unittest.cc
glue
model_association_manager_unittest.ccmodel_type_controller_unittest.ccprofile_sync_service_startup_unittest.ccprofile_sync_service_unittest.ccshared_change_processor_unittest.ccstartup_controller_unittest.ccsync_auth_manager_unittest.ccsync_session_durations_metrics_recorder_unittest.ccsync_stopped_reporter_unittest.ccengine
engine_impl
apply_control_data_updates_unittest.ccdirectory_commit_contribution_unittest.ccdirectory_update_handler_unittest.ccjs_mutation_event_observer_unittest.ccjs_sync_encryption_handler_observer_unittest.ccjs_sync_manager_observer_unittest.ccmodel_type_registry_unittest.ccsync_encryption_handler_impl_unittest.ccsync_manager_impl_unittest.ccsync_scheduler_impl_unittest.ccsyncer_proto_util_unittest.ccsyncer_unittest.ccsyncer_util_unittest.ccuss_migrator_unittest.cc
js
model
model_impl
client_tag_based_model_type_processor_unittest.ccmodel_type_store_impl_unittest.ccsyncable_service_based_bridge_unittest.cc
syncable
sync_bookmarks
sync_device_info
sync_sessions
favicon_cache_unittest.cclost_navigations_recorder_unittest.ccsession_store_unittest.ccsession_sync_bridge_unittest.cc
sync_user_events
timers
tracing
translate
core
ui_devtools
ukm
unified_consent
update_client
component_patcher_unittest.cccomponent_patcher_unittest.hcomponent_unpacker_unittest.cccrx_downloader_unittest.ccping_manager_unittest.ccrequest_sender_unittest.ccupdate_checker_unittest.ccupdate_client_unittest.cc
upload_list
url_formatter
variations
child_process_field_trial_syncer_unittest.cc
service
synthetic_trial_registry_unittest.ccvariations_crash_keys_unittest.ccvariations_http_header_provider_unittest.ccvariations_id_collection_unittest.ccvariations_request_scheduler_mobile_unittest.ccvariations_request_scheduler_unittest.ccviz
common
web_resource
fuchsia/engine/browser
google_apis
drive
base_requests_server_unittest.ccbase_requests_unittest.ccdrive_api_requests_unittest.ccfiles_list_request_runner_unittest.cc
gaia
gaia_auth_fetcher_unittest.ccgaia_oauth_client_unittest.ccoauth2_access_token_fetcher_impl_unittest.ccoauth2_access_token_manager_unittest.ccoauth2_api_call_flow_unittest.cc
gcm
gpu
command_buffer
client
service
tests
ipc
ios
chrome
app
browser
app_launcher
autofill
manual_fill
download
history
infobars
json_parser
metrics
net
passwords
payments
ios_payment_instrument_finder_unittest.mmios_payment_instrument_launcher_unittest.mmpayment_request_unittest.mmpayment_response_helper_unittest.mm
reading_list
send_tab_to_self
sessions
ui
activity_services
infobars
ntp
omnibox
open_in
settings
clear_browsing_data
dataplan_usage_table_view_controller_unittest.mmlanguage
password
settings_root_table_view_controller_unittest.mmtranslate_table_view_controller_unittest.mmvoice_search_table_view_controller_unittest.mmtoolbar
url_loading
web
components
io_thread
net
cookies
cookie_store_ios_persistent_unittest.mmcookie_store_ios_unittest.mmns_http_system_cookie_store_unittest.mm
protocol_handler_util_unittest.mmweb
browsing_data
public
test
webui
web_view
internal
ipc
ipc_channel_mojo_unittest.ccipc_cpu_perftest.ccipc_mojo_bootstrap_unittest.ccipc_mojo_perftest.ccipc_sync_channel_unittest.ccipc_test_base.h
jingle
glue
fake_ssl_client_socket_unittest.ccnetwork_service_async_socket_unittest.cctask_pump_unittest.ccthread_wrapper_unittest.cc
notifier
media
audio
alive_checker_unittest.ccaudio_debug_file_writer_unittest.ccaudio_debug_recording_helper_unittest.ccaudio_debug_recording_manager_unittest.ccaudio_debug_recording_session_impl_unittest.ccaudio_debug_recording_test.haudio_input_controller_unittest.ccaudio_input_device_unittest.ccaudio_input_sync_writer_unittest.ccaudio_low_latency_input_output_unittest.ccaudio_output_device_unittest.ccaudio_output_proxy_unittest.ccaudio_sync_reader_unittest.ccaudio_system_impl_unittest.ccaudio_thread_hang_monitor_unittest.cc
mac
power_observer_helper_unittest.ccwin
base
android
audio_renderer_mixer_input_unittest.ccaudio_renderer_mixer_unittest.ccbind_to_current_loop_unittest.cccallback_registry_unittest.ccfake_audio_worker_unittest.ccfake_demuxer_stream_unittest.ccfallback_video_decoder_unittest.ccmedia_url_demuxer_unittest.ccnull_video_sink_unittest.ccpipeline_impl_unittest.ccserial_runner_unittest.cctext_renderer_unittest.ccuser_input_monitor_unittest.ccvideo_thumbnail_decoder_unittest.ccblink
capabilities
capture
video
cast
net
sender
test
cdm
device_monitors
filters
android
aom_video_decoder_unittest.ccaudio_decoder_stream_unittest.ccaudio_decoder_unittest.ccchunk_demuxer_unittest.ccdav1d_video_decoder_unittest.ccdecoder_selector_unittest.ccdecrypting_audio_decoder_unittest.ccdecrypting_demuxer_stream_unittest.ccdecrypting_media_resource_unittest.ccdecrypting_video_decoder_unittest.ccdemuxer_perftest.ccfake_video_decoder_unittest.ccffmpeg_demuxer_unittest.ccffmpeg_video_decoder_unittest.ccframe_processor_unittest.ccfuchsia
offloading_video_decoder_unittest.ccpipeline_controller_unittest.ccvideo_decoder_stream_unittest.ccvpx_video_decoder_unittest.ccgpu
android
codec_allocator_unittest.cccodec_image_group_unittest.cccodec_image_unittest.cccodec_wrapper_unittest.ccmedia_codec_video_decoder_unittest.cctexture_pool_unittest.ccvideo_frame_factory_impl_unittest.cc
ipc
linux
test
vaapi
video_decode_accelerator_unittest.ccvideo_encode_accelerator_unittest.ccwindows
learning
impl
distribution_reporter_unittest.ccextra_trees_trainer_unittest.cclearning_fuzzertest.cclearning_session_impl_unittest.cclearning_task_controller_helper_unittest.cclearning_task_controller_impl_unittest.cclookup_table_trainer_unittest.ccrandom_tree_trainer_unittest.cc
mojo
midi
mojo
clients
mojo_android_overlay_unittest.ccmojo_audio_decoder_unittest.ccmojo_video_encode_accelerator_unittest.cc
common
mojom
services
cdm_service_unittest.ccdeferred_destroy_strong_binding_set_unittest.ccmedia_service_unittest.ccmojo_audio_input_stream_unittest.ccmojo_audio_output_stream_provider_unittest.ccmojo_audio_output_stream_unittest.ccmojo_cdm_file_io_unittest.ccmojo_cdm_helper_unittest.ccmojo_video_encode_accelerator_service_unittest.ccvideo_decode_perf_history_unittest.ccwatch_time_recorder_unittest.cc
test
remoting
renderers
audio_renderer_impl_unittest.ccdecrypting_renderer_unittest.ccpaint_canvas_video_renderer_unittest.ccrenderer_impl_unittest.ccvideo_renderer_impl_unittest.ccvideo_resource_updater_unittest.cc
test
pipeline_integration_fuzzertest.ccpipeline_integration_test.ccpipeline_integration_test_base.ccpipeline_integration_test_base.h
webrtc
mojo
core
public
cpp
bindings
tests
associated_interface_unittest.ccbind_task_runner_unittest.ccbindings_perftest.ccbindings_test_base.hconnection_group_unittest.ccconnector_unittest.ccdata_view_unittest.cce2e_perftest.cclazy_serialization_unittest.ccmultiplex_router_unittest.ccnew_endpoint_types_unittest.ccpickle_unittest.ccreceiver_callback_unittest.ccremote_unittest.ccservice_factory_unittest.ccstruct_traits_unittest.ccsync_method_unittest.cctest_helpers_unittest.ccunion_unittest.ccvalidation_unittest.ccwtf_types_unittest.cc
system
ppapi
host
proxy
shared_impl
printing
remoting
base
auto_thread_task_runner_unittest.ccauto_thread_unittest.ccbuffered_socket_writer_unittest.cc
grpc_support
oauth_token_getter_proxy_unittest.cctelemetry_log_writer_unittest.ccclient
host
chromeos
chromoting_host_context_unittest.ccchromoting_host_unittest.ccclient_session_unittest.ccconfig_file_watcher_unittest.ccdaemon_process_unittest.ccdesktop_process_unittest.ccdesktop_session_agent_unittest.ccfile_transfer
buffered_file_writer_unittest.ccfile_transfer_message_handler_unittest.ccipc_file_operations_unittest.cclocal_file_operations_unittest.cc
ftl_host_change_notification_listener_unittest.ccftl_signaling_connector_unittest.ccgcd_rest_client_unittest.ccgcd_state_updater_unittest.ccheartbeat_sender_unittest.cchost_power_save_blocker_unittest.cchost_status_logger_unittest.ccinput_monitor
ipc_desktop_environment_unittest.ccit2me
linux
mouse_cursor_monitor_proxy_unittest.ccmouse_shape_pump_unittest.ccnative_messaging
policy_watcher_unittest.ccprocess_stats_sender_unittest.ccremoting_register_support_host_request_unittest.ccresizing_host_observer_unittest.ccsecurity_key
security_key_auth_handler_posix_unittest.ccsecurity_key_auth_handler_win_unittest.ccsecurity_key_extension_session_unittest.ccsecurity_key_ipc_client_unittest.ccsecurity_key_ipc_server_unittest.ccsecurity_key_message_handler_unittest.ccsecurity_key_message_reader_impl_unittest.ccsecurity_key_message_writer_impl_unittest.cc
token_validator_factory_impl_unittest.ccwin
xmpp_register_support_host_request_unittest.ccios
protocol
audio_decode_scheduler_unittest.ccaudio_pump_unittest.ccauthenticator_test_base.hcapture_scheduler_unittest.ccchannel_multiplexer_unittest.ccchannel_socket_adapter_unittest.ccchromium_socket_factory_unittest.ccclient_video_dispatcher_unittest.ccconnection_unittest.ccdata_channel_manager_unittest.ccice_transport_unittest.ccjingle_session_unittest.ccmessage_reader_unittest.ccmonitored_video_stub_unittest.ccpairing_registry_unittest.ccpseudotcp_adapter_unittest.ccremoting_ice_config_request_unittest.ccssl_hmac_channel_authenticator_unittest.ccvalidating_authenticator_unittest.ccvideo_frame_pump_unittest.ccwebrtc_audio_source_adapter_unittest.ccwebrtc_transport_unittest.cc
signaling
ftl_message_reception_channel_unittest.ccftl_messaging_client_unittest.ccftl_registration_manager_unittest.ccftl_signal_strategy_unittest.cciq_sender_unittest.ccmessage_tracker_unittest.ccremoting_log_to_server_unittest.ccxmpp_log_to_server_unittest.cc
test
rlz
sandbox/mac/mojom
services
audio
debug_recording_unittest.ccdevice_notifier_unittest.ccinput_controller_unittest.ccinput_stream_unittest.ccinput_sync_writer_unittest.cclocal_muter_unittest.cclog_factory_manager_unittest.ccloopback_stream_unittest.ccoutput_stream_unittest.cc
public
stream_factory_unittest.ccsync_reader_unittest.cctest
content
data_decoder
bundled_exchanges_parser_factory_unittest.ccbundled_exchanges_parser_unittest.ccimage_decoder_impl_unittest.cc
public
device
device_service_test_base.h
fingerprint
generic_sensor
absolute_orientation_euler_angles_fusion_algorithm_using_accelerometer_and_magnetometer_unittest.cclinear_acceleration_fusion_algorithm_using_accelerometer_unittest.ccorientation_euler_angles_fusion_algorithm_using_quaternion_unittest.ccorientation_quaternion_fusion_algorithm_using_euler_angles_unittest.ccplatform_sensor_and_provider_unittest.ccplatform_sensor_and_provider_unittest_linux.ccplatform_sensor_and_provider_unittest_win.ccplatform_sensor_fusion_unittest.ccplatform_sensor_provider_winrt_unittest.ccplatform_sensor_reader_winrt_unittests.ccrelative_orientation_euler_angles_fusion_algorithm_using_accelerometer_and_gyroscope_unittest.ccrelative_orientation_euler_angles_fusion_algorithm_using_accelerometer_unittest.cc
geolocation
geolocation_provider_impl_unittest.cclocation_arbitrator_unittest.ccnetwork_location_provider_unittest.ccposition_cache_impl_perftest.ccposition_cache_impl_unittest.ccpublic_ip_address_geolocator_unittest.ccpublic_ip_address_location_notifier_unittest.ccwifi_data_provider_chromeos_unittest.ccwifi_data_provider_common_unittest.ccwifi_data_provider_linux_unittest.ccwifi_data_provider_win_unittest.cc
hid
public
cpp
power_monitor
serial
usb
identity
image_annotation
media_session
network
cert_verifier_with_trust_anchors_unittest.ccchunked_data_pipe_upload_data_stream_unittest.cccookie_manager_unittest.cc
cors
cross_origin_read_blocking_unittest.ccdata_pipe_element_reader_unittest.ccdns_config_change_manager_unittest.ccexpect_ct_reporter_unittest.cchost_resolver_unittest.cchttp_cache_data_counter_unittest.cchttp_cache_data_remover_unittest.ccmdns_responder_unittest.ccmojo_host_resolver_impl_unittest.ccnetwork_change_manager_unittest.ccnetwork_context_unittest.ccnetwork_qualities_pref_delegate_unittest.ccnetwork_quality_estimator_manager_unittest.ccnetwork_service_proxy_delegate_unittest.ccnetwork_service_unittest.ccorigin_policy
p2p
proxy_config_service_mojo_unittest.ccproxy_resolver_factory_mojo_unittest.ccproxy_resolving_client_socket_unittest.ccproxy_resolving_socket_mojo_unittest.ccpublic
cpp
resource_scheduler
restricted_cookie_manager_unittest.ccsec_header_helpers_unittest.ccsession_cleanup_cookie_store_unittest.ccsocket_data_pump_unittest.ccssl_config_service_mojo_unittest.cctcp_bound_socket_unittest.cctcp_socket_unittest.cctest
throttling
tls_client_socket_unittest.cctransitional_url_loader_factory_owner_unittest.ccudp_socket_unittest.ccurl_loader_unittest.ccwebsocket_throttler_unittest.ccpreferences
persistent_pref_store_impl_unittest.ccpref_service_factory_unittest.ccpref_store_consistency_unittest.ccpref_store_impl_unittest.cc
public
tracked
proxy_resolver
host_resolver_mojo_unittest.ccproxy_resolver_factory_impl_unittest.ccproxy_resolver_impl_unittest.cc
resource_coordinator
memory_instrumentation
service_manager
public
tests
shape_detection
barcode_detection_impl_mac_unittest.mmbarcode_detection_provider_mac_unittest.mmface_detection_impl_mac_unittest.mmface_detection_impl_win_unittest.cctext_detection_impl_mac_unittest.mmtext_detection_impl_win_unittest.cc
tracing
video_capture
broadcasting_receiver_unittest.ccdevice_media_to_mojo_adapter_unittest.cc
test
mock_device_shared_access_unittest.ccservice_lifecycle_unittest.ccvideo_capture_service_test.hvirtual_device_unittest.cc
texture_virtual_device_mojo_adapter_unittest.ccviz
public
cpp
skia/public/mojom/test
storage/browser
blob
blob_builder_from_stream_unittest.ccblob_flattener_unittest.ccblob_impl_unittest.ccblob_memory_controller_unittest.ccblob_reader_unittest.ccblob_registry_impl_unittest.ccblob_storage_context_unittest.ccblob_transport_strategy_unittest.ccblob_url_store_impl_unittest.cc
database
fileapi
copy_or_move_file_validator_unittest.cccopy_or_move_operation_delegate_unittest.ccdragged_file_util_unittest.ccfile_system_context_unittest.ccfile_system_file_stream_reader_unittest.ccfile_system_operation_impl_unittest.ccfile_system_operation_impl_write_unittest.ccfile_system_quota_client_unittest.ccfile_system_usage_cache_unittest.ccfile_writer_delegate_unittest.cclocal_file_stream_reader_unittest.cclocal_file_stream_writer_unittest.cclocal_file_util_unittest.ccobfuscated_file_util_unittest.ccplugin_private_file_system_backend_unittest.cc
quota
recursive_operation_delegate_unittest.ccsandbox_file_system_backend_delegate_unittest.ccsandbox_file_system_backend_unittest.cctransient_file_util_unittest.ccquota
quota_database_unittest.ccquota_manager_unittest.ccquota_settings_unittest.ccquota_temporary_storage_evictor_unittest.ccusage_tracker_unittest.cc
test
third_party/blink
common
messaging
public
platform
renderer
platform
bindings
blob
exported
fonts
graphics
heap
loader
media
mojo
network
scheduler
common
main_thread
deadline_task_runner_unittest.ccframe_interference_recorder_unittest.ccframe_scheduler_impl_unittest.ccframe_task_queue_controller_unittest.ccidle_time_estimator_unittest.ccmain_thread_metrics_helper_unittest.ccmemory_purge_manager_unittest.cc
worker
video_capture
ui
android
resources
aura
base
accelerators
clipboard
cocoa
dragdrop
os_exchange_data_provider_aurax11_unittest.ccos_exchange_data_unittest.ccos_exchange_data_win_unittest.cc
ime
mpris
test
x
compositor
display
events
blink
gesture_detection
gestures
ozone
evdev
platform
win
gfx
animation
font_fallback_win_unittest.ccgeometry
image
mojom
range
render_text_unittest.cctext_elider_unittest.ccgl
latency
message_center
ozone
platform
shell_dialogs
snapshot
views
url/mojom
@ -714,7 +714,7 @@ _BANNED_CPP_FUNCTIONS = (
|
||||
'base::ScopedMockTimeMessageLoopTaskRunner',
|
||||
(
|
||||
'ScopedMockTimeMessageLoopTaskRunner is deprecated. Prefer',
|
||||
'ScopedTaskEnvironment::TimeSource::MOCK_TIME. There are still a',
|
||||
'TaskEnvironment::TimeSource::MOCK_TIME. There are still a',
|
||||
'few cases that may require a ScopedMockTimeMessageLoopTaskRunner',
|
||||
'(i.e. mocking the main MessageLoopForUI in browser_tests), but check',
|
||||
'with gab@ first if you think you need it)',
|
||||
|
@ -17,7 +17,7 @@ class AwContentBrowserClientTest : public testing::Test {
|
||||
mojo::core::Init();
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
};
|
||||
|
||||
TEST_F(AwContentBrowserClientTest, DisableCreatingThreadPool) {
|
||||
|
@ -37,11 +37,11 @@ class AwFormDatabaseServiceTest : public Test {
|
||||
|
||||
void TearDown() override {
|
||||
service_->Shutdown();
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
}
|
||||
|
||||
// The path to the temporary directory used for the test operations.
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
base::ScopedTempDir temp_dir_;
|
||||
JNIEnv* env_;
|
||||
std::unique_ptr<AwFormDatabaseService> service_;
|
||||
|
@ -65,7 +65,7 @@ class AwMetricsServiceClientTest : public testing::Test {
|
||||
~AwMetricsServiceClientTest() override {}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AwMetricsServiceClientTest);
|
||||
|
@ -233,7 +233,7 @@ class AndroidStreamReaderURLLoaderTest : public ::testing::Test {
|
||||
return std::string(buffer.data(), buffer.size());
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AndroidStreamReaderURLLoaderTest);
|
||||
};
|
||||
|
@ -30,8 +30,8 @@ class AwSafeBrowsingWhitelistManagerTest : public testing::Test {
|
||||
|
||||
void SetWhitelist(std::vector<std::string>&& whitelist, bool expected);
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO};
|
||||
base::test::TaskEnvironment task_environment_{
|
||||
base::test::TaskEnvironment::MainThreadType::IO};
|
||||
std::unique_ptr<AwSafeBrowsingWhitelistManager> wm_;
|
||||
};
|
||||
|
||||
|
@ -19,8 +19,8 @@ jboolean JNI_MemoryMetricsLoggerTest_ForceRecordHistograms(JNIEnv* env) {
|
||||
return false;
|
||||
|
||||
TestTimeouts::Initialize();
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment(
|
||||
base::test::ScopedTaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY);
|
||||
base::RunLoop run_loop;
|
||||
bool result = false;
|
||||
memory_metrics_logger->ScheduleRecordForTesting(
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace util {
|
||||
|
||||
TEST(MultiSourceMemoryPressureMonitorTest, RunDispatchCallback) {
|
||||
base::test::ScopedTaskEnvironment task_environment;
|
||||
base::test::TaskEnvironment task_environment;
|
||||
MultiSourceMemoryPressureMonitor monitor;
|
||||
auto* aggregator = monitor.aggregator_for_testing();
|
||||
|
||||
|
@ -49,7 +49,7 @@ class IconConverterTest : public testing::Test {
|
||||
std::vector<std::string>* encoded_data() { return &encoded_data_; }
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
std::unique_ptr<IconConverter> icon_converter_;
|
||||
std::vector<std::string> encoded_data_;
|
||||
std::vector<SkBitmap> decoded_icons_;
|
||||
|
@ -139,7 +139,7 @@ class AnimatingLayoutManagerSteppingTest : public testing::Test {
|
||||
View* view_;
|
||||
std::vector<View*> children_;
|
||||
AnimatingLayoutManager* animating_layout_manager_ = nullptr;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
std::unique_ptr<gfx::AnimationContainerTestApi> container_test_api_;
|
||||
};
|
||||
|
||||
|
@ -103,7 +103,7 @@ class ArcPowerBridgeTest : public testing::Test {
|
||||
return chromeos::FakePowerManagerClient::Get();
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
service_manager::TestConnectorFactory connector_factory_;
|
||||
|
||||
|
@ -72,7 +72,7 @@ class ArcDataRemoverTest : public testing::Test {
|
||||
private:
|
||||
TestingPrefServiceSimple prefs_;
|
||||
const cryptohome::Identification cryptohome_id_{EmptyAccountId()};
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
std::unique_ptr<TestUpstartClient> test_upstart_client_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ArcDataRemoverTest);
|
||||
|
@ -224,7 +224,7 @@ class ArcSessionImplTest : public testing::Test {
|
||||
}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
user_manager::ScopedUserManager scoped_user_manager_{
|
||||
std::make_unique<user_manager::FakeUserManager>()};
|
||||
|
||||
|
@ -56,8 +56,7 @@ class ArcSessionRunnerTest : public testing::Test,
|
||||
public ArcSessionRunner::Observer {
|
||||
public:
|
||||
ArcSessionRunnerTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
|
||||
: task_environment_(base::test::TaskEnvironment::MainThreadType::UI) {}
|
||||
|
||||
void SetUp() override {
|
||||
chromeos::SessionManagerClient::InitializeFakeInMemory();
|
||||
@ -137,7 +136,7 @@ class ArcSessionRunnerTest : public testing::Test,
|
||||
bool stopped_called_;
|
||||
bool restarting_called_;
|
||||
std::unique_ptr<ArcSessionRunner> arc_session_runner_;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ArcSessionRunnerTest);
|
||||
};
|
||||
|
@ -27,8 +27,7 @@ using device::mojom::WakeLockType;
|
||||
class ArcWakeLockBridgeTest : public testing::Test {
|
||||
public:
|
||||
ArcWakeLockBridgeTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME),
|
||||
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
|
||||
wake_lock_provider_(
|
||||
connector_factory_.RegisterInstance(device::mojom::kServiceName)) {
|
||||
bridge_service_ = std::make_unique<ArcBridgeService>();
|
||||
@ -98,7 +97,7 @@ class ArcWakeLockBridgeTest : public testing::Test {
|
||||
}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
service_manager::TestConnectorFactory connector_factory_;
|
||||
device::TestWakeLockProvider wake_lock_provider_;
|
||||
|
@ -113,7 +113,7 @@ class BasePredictorTest : public ::testing::Test {
|
||||
|
||||
private:
|
||||
// Sets up the task scheduling/task-runner environment for each test.
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
// Sets itself as the global UkmRecorder on construction.
|
||||
ukm::TestAutoSetUkmRecorder test_ukm_recorder_;
|
||||
|
@ -76,7 +76,7 @@ class RankerModelLoaderImplTest : public ::testing::Test {
|
||||
void OnModelAvailable(std::unique_ptr<RankerModel> model);
|
||||
|
||||
// Sets up the task scheduling/task-runner environment for each test.
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
// Override the default URL loader to return custom responses for tests.
|
||||
network::TestURLLoaderFactory test_loader_factory_;
|
||||
@ -175,7 +175,7 @@ bool RankerModelLoaderImplTest::DoLoaderTest(const base::FilePath& model_path,
|
||||
test_shared_loader_factory_, model_path, model_url,
|
||||
"RankerModelLoaderImplTest");
|
||||
loader->NotifyOfRankerActivity();
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ class TestLogger : public RendererSavePasswordProgressLogger {
|
||||
} // namespace
|
||||
|
||||
TEST(RendererSavePasswordProgressLoggerTest, SendLog) {
|
||||
base::test::ScopedTaskEnvironment task_environment;
|
||||
base::test::TaskEnvironment task_environment;
|
||||
FakeContentPasswordManagerDriver fake_driver;
|
||||
mojom::PasswordManagerDriverPtr driver_ptr =
|
||||
fake_driver.CreateInterfacePtrAndBind();
|
||||
|
@ -94,7 +94,7 @@ class AddressNormalizerTest : public testing::Test {
|
||||
~AddressNormalizerTest() override {}
|
||||
|
||||
void WaitForAddressValidatorInitialization() {
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
}
|
||||
|
||||
bool normalization_successful() const { return success_; }
|
||||
@ -103,7 +103,7 @@ class AddressNormalizerTest : public testing::Test {
|
||||
|
||||
TestAddressNormalizer* normalizer() { return &normalizer_; }
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
bool AreRulesLoadedForRegion(const std::string& region_code) {
|
||||
return normalizer_.AreRulesLoadedForRegion(region_code);
|
||||
@ -187,7 +187,7 @@ TEST_F(AddressNormalizerTest,
|
||||
base::Unretained(this)));
|
||||
|
||||
// Let the timeout execute.
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
|
||||
// Since the rules are never loaded and the timeout is 0, the callback should
|
||||
// get notified that the address could not be normalized.
|
||||
@ -338,7 +338,7 @@ TEST_F(AddressNormalizerTest, FormatPhone_AddressNotNormalizedAsync) {
|
||||
base::Unretained(this)));
|
||||
|
||||
// Let the timeout execute.
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
|
||||
// Make sure the address was not normalized.
|
||||
EXPECT_FALSE(normalization_successful());
|
||||
|
@ -150,7 +150,7 @@ class AutocompleteHistoryManagerTest : public testing::Test {
|
||||
date_last_used);
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
scoped_refptr<MockWebDataService> web_data_service_;
|
||||
std::unique_ptr<AutocompleteHistoryManager> autocomplete_manager_;
|
||||
std::unique_ptr<PrefService> prefs_;
|
||||
|
@ -148,7 +148,7 @@ class AutofillAssistantTest : public testing::Test {
|
||||
return static_cast<CardUnmaskDelegate*>(full_card_request);
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
TestAutofillClient autofill_client_;
|
||||
testing::NiceMock<TestAutofillDriver> autofill_driver_;
|
||||
TestPersonalDataManager pdm_;
|
||||
|
@ -251,7 +251,7 @@ class AutofillDownloadManagerTest : public AutofillDownloadManager::Observer,
|
||||
};
|
||||
|
||||
ScopedActiveAutofillExperiments scoped_active_autofill_experiments;
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
std::list<ResponseData> responses_;
|
||||
scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_;
|
||||
network::TestURLLoaderFactory test_url_loader_factory_;
|
||||
@ -1492,8 +1492,8 @@ class AutofillServerCommunicationTest
|
||||
return succeeded;
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO};
|
||||
base::test::TaskEnvironment task_environment_{
|
||||
base::test::TaskEnvironment::MainThreadType::IO};
|
||||
base::test::ScopedCommandLine scoped_command_line_;
|
||||
base::test::ScopedFeatureList scoped_feature_list_1_;
|
||||
base::test::ScopedFeatureList scoped_feature_list_2_;
|
||||
|
@ -100,7 +100,7 @@ class AutofillDriverFactoryTest : public testing::Test {
|
||||
|
||||
protected:
|
||||
// For TestAutofillDriver.
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
MockAutofillClient client_;
|
||||
|
||||
|
@ -181,7 +181,7 @@ class AutofillExternalDelegateUnitTest : public testing::Test {
|
||||
kQueryId, suggestions, /*autoselect_first_suggestion=*/false);
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
testing::NiceMock<MockAutofillClient> autofill_client_;
|
||||
std::unique_ptr<testing::NiceMock<MockAutofillDriver>> autofill_driver_;
|
||||
|
@ -589,7 +589,7 @@ class AutofillManagerTest : public testing::Test {
|
||||
}
|
||||
|
||||
protected:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
MockAutofillClient autofill_client_;
|
||||
std::unique_ptr<MockAutofillDriver> autofill_driver_;
|
||||
std::unique_ptr<TestAutofillManager> autofill_manager_;
|
||||
|
@ -183,7 +183,7 @@ class AutofillMergeTest : public DataDrivenTest,
|
||||
// Deserializes |str| into a field type.
|
||||
ServerFieldType StringToFieldType(const std::string& str);
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
TestAutofillClient autofill_client_;
|
||||
PersonalDataManagerMock personal_data_;
|
||||
std::unique_ptr<FormDataImporter> form_data_importer_;
|
||||
|
@ -283,7 +283,7 @@ class AutofillMetricsTest : public testing::Test {
|
||||
// Purge recorded UKM metrics for running more tests.
|
||||
void PurgeUKM();
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
MockAutofillClient autofill_client_;
|
||||
ukm::TestUkmRecorder* test_ukm_recorder_;
|
||||
syncer::TestSyncService sync_service_;
|
||||
|
@ -105,7 +105,7 @@ class AutofillProfileValidatorTest : public testing::Test {
|
||||
expected_validity_;
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment scoped_task_scheduler;
|
||||
base::test::TaskEnvironment scoped_task_scheduler;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AutofillProfileValidatorTest);
|
||||
};
|
||||
|
@ -758,14 +758,14 @@ class AutofillSelectWithStatesTest
|
||||
std::unique_ptr<Storage>(new NullStorage), "en-US");
|
||||
// Make sure the normalizer is done initializing its member(s) in
|
||||
// background task(s).
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
}
|
||||
|
||||
protected:
|
||||
AddressNormalizer* normalizer() { return normalizer_.get(); }
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
std::unique_ptr<AddressNormalizerImpl> normalizer_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AutofillSelectWithStatesTest);
|
||||
|
@ -223,8 +223,8 @@ class FormDataImporterTestBase {
|
||||
run_loop.Run();
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment task_environment_{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::UI};
|
||||
base::test::TaskEnvironment task_environment_{
|
||||
base::test::TaskEnvironment::MainThreadType::UI};
|
||||
std::unique_ptr<PrefService> prefs_;
|
||||
scoped_refptr<AutofillWebDataService> autofill_database_service_;
|
||||
scoped_refptr<WebDatabaseService> web_database_;
|
||||
|
@ -102,7 +102,7 @@ class SubKeyRequesterTest : public testing::Test {
|
||||
|
||||
~SubKeyRequesterTest() override {}
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
std::unique_ptr<TestSubKeyRequester> requester_;
|
||||
|
||||
private:
|
||||
@ -157,7 +157,7 @@ TEST_F(SubKeyRequesterTest, StartRequest_RulesNotLoaded_WillNotLoad) {
|
||||
requester_->StartRegionSubKeysRequest(kLocale, kLanguage, 0, std::move(cb));
|
||||
|
||||
// Let the timeout execute.
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
|
||||
// Since the rules are never loaded and the timeout is 0, the delegate should
|
||||
// get notified that the subkeys could not be received.
|
||||
|
@ -148,7 +148,7 @@ class AutofillWalletDataTypeControllerTest : public testing::Test {
|
||||
last_error_ = error;
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
TestingPrefServiceSimple prefs_;
|
||||
syncer::UserShare user_share_;
|
||||
testing::NiceMock<syncer::MockSyncService> sync_service_;
|
||||
|
@ -141,10 +141,9 @@ std::string NextMonth() {
|
||||
class CreditCardAccessManagerTest : public testing::Test {
|
||||
public:
|
||||
CreditCardAccessManagerTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::DEFAULT,
|
||||
base::test::ScopedTaskEnvironment::ThreadPoolExecutionMode::
|
||||
QUEUED) {}
|
||||
: task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::DEFAULT,
|
||||
base::test::TaskEnvironment::ThreadPoolExecutionMode::QUEUED) {}
|
||||
|
||||
void SetUp() override {
|
||||
autofill_client_.SetPrefs(test::PrefServiceForTesting());
|
||||
@ -283,11 +282,11 @@ class CreditCardAccessManagerTest : public testing::Test {
|
||||
credit_card_access_manager_->ready_to_start_authentication_.Signal();
|
||||
}
|
||||
|
||||
void WaitForCallbacks() { scoped_task_environment_.RunUntilIdle(); }
|
||||
void WaitForCallbacks() { task_environment_.RunUntilIdle(); }
|
||||
|
||||
protected:
|
||||
std::unique_ptr<TestAccessor> accessor_;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
payments::TestPaymentsClient* payments_client_;
|
||||
TestAutofillClient autofill_client_;
|
||||
std::unique_ptr<TestAutofillDriver> autofill_driver_;
|
||||
|
@ -151,7 +151,7 @@ class CreditCardCVCAuthenticatorTest : public testing::Test {
|
||||
|
||||
protected:
|
||||
std::unique_ptr<TestAuthenticationRequester> requester_;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
TestAutofillClient autofill_client_;
|
||||
std::unique_ptr<TestAutofillDriver> autofill_driver_;
|
||||
scoped_refptr<AutofillWebDataService> database_;
|
||||
|
@ -225,7 +225,7 @@ class CreditCardFIDOAuthenticatorTest : public testing::Test {
|
||||
|
||||
protected:
|
||||
std::unique_ptr<TestAuthenticationRequester> requester_;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
TestAutofillClient autofill_client_;
|
||||
std::unique_ptr<TestAutofillDriver> autofill_driver_;
|
||||
scoped_refptr<AutofillWebDataService> database_;
|
||||
|
@ -349,7 +349,7 @@ class CreditCardSaveManagerTest : public testing::Test {
|
||||
}
|
||||
|
||||
protected:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
TestAutofillClient autofill_client_;
|
||||
std::unique_ptr<TestAutofillDriver> autofill_driver_;
|
||||
std::unique_ptr<TestAutofillManager> autofill_manager_;
|
||||
|
@ -107,7 +107,7 @@ class FullCardRequestTest : public testing::Test {
|
||||
}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
MockPersonalDataManager personal_data_;
|
||||
MockResultDelegate result_delegate_;
|
||||
MockUIDelegate ui_delegate_;
|
||||
|
@ -305,7 +305,7 @@ class LocalCardMigrationManagerTest : public testing::Test {
|
||||
}
|
||||
|
||||
protected:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
TestAutofillClient autofill_client_;
|
||||
std::unique_ptr<TestAutofillDriver> autofill_driver_;
|
||||
std::unique_ptr<TestAutofillManager> autofill_manager_;
|
||||
|
@ -318,7 +318,7 @@ class PaymentsClientTest : public testing::Test {
|
||||
// A tip message to be displayed during local card migration.
|
||||
std::string display_text_;
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
network::TestURLLoaderFactory test_url_loader_factory_;
|
||||
scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_;
|
||||
TestPersonalDataManager test_personal_data_;
|
||||
|
@ -43,12 +43,12 @@ class StrikeDatabaseIntegratorTestStrikeDatabaseTest : public ::testing::Test {
|
||||
// to a task runner, requires running the loop to complete.
|
||||
strike_database_.reset();
|
||||
strike_database_service_.reset();
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
}
|
||||
|
||||
protected:
|
||||
base::HistogramTester* GetHistogramTester() { return &histogram_tester_; }
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
base::ScopedTempDir temp_dir_;
|
||||
std::unique_ptr<leveldb_proto::ProtoDatabaseProvider> db_provider_;
|
||||
std::unique_ptr<StrikeDatabase> strike_database_service_;
|
||||
|
@ -129,7 +129,7 @@ class StrikeDatabaseTest : public ::testing::Test {
|
||||
|
||||
protected:
|
||||
base::HistogramTester* GetHistogramTester() { return &histogram_tester_; }
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
std::unique_ptr<leveldb_proto::ProtoDatabaseProvider> db_provider_;
|
||||
std::unique_ptr<TestStrikeDatabase> strike_database_;
|
||||
base::ScopedTempDir temp_dir_;
|
||||
|
@ -297,8 +297,8 @@ class PersonalDataManagerTestBase {
|
||||
run_loop.Run();
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment task_environment_{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::UI};
|
||||
base::test::TaskEnvironment task_environment_{
|
||||
base::test::TaskEnvironment::MainThreadType::UI};
|
||||
std::unique_ptr<PrefService> prefs_;
|
||||
network::TestURLLoaderFactory test_url_loader_factory_;
|
||||
signin::IdentityTestEnvironment identity_test_env_;
|
||||
|
@ -293,7 +293,7 @@ class AutocompleteSyncBridgeTest : public testing::Test {
|
||||
|
||||
private:
|
||||
ScopedTempDir temp_dir_;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
testing::NiceMock<MockAutofillWebDataBackend> backend_;
|
||||
AutofillTable table_;
|
||||
WebDatabase db_;
|
||||
|
@ -321,7 +321,7 @@ class AutofillProfileSyncBridgeTest : public testing::Test {
|
||||
private:
|
||||
autofill::TestAutofillClock test_clock_;
|
||||
ScopedTempDir temp_dir_;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
testing::NiceMock<MockAutofillWebDataBackend> backend_;
|
||||
AutofillTable table_;
|
||||
WebDatabase db_;
|
||||
|
@ -107,7 +107,7 @@ class AutofillProfileSyncDifferenceTrackerTestBase : public testing::Test {
|
||||
private:
|
||||
autofill::TestAutofillClock test_clock_;
|
||||
base::ScopedTempDir temp_dir_;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
AutofillTable table_;
|
||||
WebDatabase db_;
|
||||
|
||||
|
@ -452,7 +452,7 @@ class AutofillWalletMetadataSyncBridgeTest : public testing::Test {
|
||||
int response_version = 0;
|
||||
autofill::TestAutofillClock test_clock_;
|
||||
ScopedTempDir temp_dir_;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
testing::NiceMock<MockAutofillWebDataBackend> backend_;
|
||||
AutofillTable table_;
|
||||
WebDatabase db_;
|
||||
|
@ -336,7 +336,7 @@ class AutofillWalletSyncBridgeTest : public UssSwitchToggler,
|
||||
private:
|
||||
autofill::TestAutofillClock test_clock_;
|
||||
ScopedTempDir temp_dir_;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
NiceMock<MockAutofillWebDataBackend> backend_;
|
||||
AutofillTable table_;
|
||||
WebDatabase db_;
|
||||
|
@ -91,8 +91,7 @@ class MockAutofillWebDataServiceObserver
|
||||
class WebDataServiceTest : public testing::Test {
|
||||
public:
|
||||
WebDataServiceTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
|
||||
: task_environment_(base::test::TaskEnvironment::MainThreadType::UI) {}
|
||||
|
||||
protected:
|
||||
void SetUp() override {
|
||||
@ -119,10 +118,10 @@ class WebDataServiceTest : public testing::Test {
|
||||
wdbs_->ShutdownDatabase();
|
||||
wds_ = nullptr;
|
||||
wdbs_ = nullptr;
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
base::FilePath profile_dir_;
|
||||
scoped_refptr<AutofillWebDataService> wds_;
|
||||
scoped_refptr<WebDatabaseService> wdbs_;
|
||||
@ -207,7 +206,7 @@ TEST_F(WebDataServiceAutofillTest, FormFillAdd) {
|
||||
static const int limit = 10;
|
||||
handle = wds_->GetFormValuesForElementName(
|
||||
name1_, base::string16(), limit, &consumer);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle, consumer.handle());
|
||||
ASSERT_EQ(1U, consumer.result().size());
|
||||
EXPECT_EQ(value1_, consumer.result()[0].key().value());
|
||||
@ -284,7 +283,7 @@ TEST_F(WebDataServiceAutofillTest, ProfileAdd) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<AutofillProfile>>>
|
||||
consumer;
|
||||
WebDataServiceBase::Handle handle = wds_->GetAutofillProfiles(&consumer);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle, consumer.handle());
|
||||
ASSERT_EQ(1U, consumer.result().size());
|
||||
EXPECT_EQ(profile, *consumer.result()[0]);
|
||||
@ -303,7 +302,7 @@ TEST_F(WebDataServiceAutofillTest, ProfileRemove) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<AutofillProfile>>>
|
||||
consumer;
|
||||
WebDataServiceBase::Handle handle = wds_->GetAutofillProfiles(&consumer);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle, consumer.handle());
|
||||
ASSERT_EQ(1U, consumer.result().size());
|
||||
EXPECT_EQ(profile, *consumer.result()[0]);
|
||||
@ -322,7 +321,7 @@ TEST_F(WebDataServiceAutofillTest, ProfileRemove) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<AutofillProfile>>>
|
||||
consumer2;
|
||||
WebDataServiceBase::Handle handle2 = wds_->GetAutofillProfiles(&consumer2);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle2, consumer2.handle());
|
||||
ASSERT_EQ(0U, consumer2.result().size());
|
||||
}
|
||||
@ -348,7 +347,7 @@ TEST_F(WebDataServiceAutofillTest, ProfileUpdate) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<AutofillProfile>>>
|
||||
consumer;
|
||||
WebDataServiceBase::Handle handle = wds_->GetAutofillProfiles(&consumer);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle, consumer.handle());
|
||||
ASSERT_EQ(2U, consumer.result().size());
|
||||
EXPECT_EQ(profile2, *consumer.result()[0]);
|
||||
@ -370,7 +369,7 @@ TEST_F(WebDataServiceAutofillTest, ProfileUpdate) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<AutofillProfile>>>
|
||||
consumer2;
|
||||
WebDataServiceBase::Handle handle2 = wds_->GetAutofillProfiles(&consumer2);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle2, consumer2.handle());
|
||||
ASSERT_EQ(2U, consumer2.result().size());
|
||||
EXPECT_EQ(profile2_changed, *consumer2.result()[0]);
|
||||
@ -386,7 +385,7 @@ TEST_F(WebDataServiceAutofillTest, CreditAdd) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<CreditCard>>>
|
||||
consumer;
|
||||
WebDataServiceBase::Handle handle = wds_->GetCreditCards(&consumer);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle, consumer.handle());
|
||||
ASSERT_EQ(1U, consumer.result().size());
|
||||
EXPECT_EQ(card, *consumer.result()[0]);
|
||||
@ -402,7 +401,7 @@ TEST_F(WebDataServiceAutofillTest, CreditCardRemove) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<CreditCard>>>
|
||||
consumer;
|
||||
WebDataServiceBase::Handle handle = wds_->GetCreditCards(&consumer);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle, consumer.handle());
|
||||
ASSERT_EQ(1U, consumer.result().size());
|
||||
EXPECT_EQ(credit_card, *consumer.result()[0]);
|
||||
@ -414,7 +413,7 @@ TEST_F(WebDataServiceAutofillTest, CreditCardRemove) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<CreditCard>>>
|
||||
consumer2;
|
||||
WebDataServiceBase::Handle handle2 = wds_->GetCreditCards(&consumer2);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle2, consumer2.handle());
|
||||
ASSERT_EQ(0U, consumer2.result().size());
|
||||
}
|
||||
@ -432,7 +431,7 @@ TEST_F(WebDataServiceAutofillTest, CreditUpdate) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<CreditCard>>>
|
||||
consumer;
|
||||
WebDataServiceBase::Handle handle = wds_->GetCreditCards(&consumer);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle, consumer.handle());
|
||||
ASSERT_EQ(2U, consumer.result().size());
|
||||
EXPECT_EQ(card2, *consumer.result()[0]);
|
||||
@ -447,7 +446,7 @@ TEST_F(WebDataServiceAutofillTest, CreditUpdate) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<CreditCard>>>
|
||||
consumer2;
|
||||
WebDataServiceBase::Handle handle2 = wds_->GetCreditCards(&consumer2);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle2, consumer2.handle());
|
||||
ASSERT_EQ(2U, consumer2.result().size());
|
||||
EXPECT_NE(card2, *consumer2.result()[0]);
|
||||
@ -468,7 +467,7 @@ TEST_F(WebDataServiceAutofillTest, AutofillRemoveModifiedBetween) {
|
||||
profile_consumer;
|
||||
WebDataServiceBase::Handle handle =
|
||||
wds_->GetAutofillProfiles(&profile_consumer);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle, profile_consumer.handle());
|
||||
ASSERT_EQ(1U, profile_consumer.result().size());
|
||||
EXPECT_EQ(profile, *profile_consumer.result()[0]);
|
||||
@ -481,7 +480,7 @@ TEST_F(WebDataServiceAutofillTest, AutofillRemoveModifiedBetween) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<CreditCard>>>
|
||||
card_consumer;
|
||||
handle = wds_->GetCreditCards(&card_consumer);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle, card_consumer.handle());
|
||||
ASSERT_EQ(1U, card_consumer.result().size());
|
||||
EXPECT_EQ(credit_card, *card_consumer.result()[0]);
|
||||
@ -501,7 +500,7 @@ TEST_F(WebDataServiceAutofillTest, AutofillRemoveModifiedBetween) {
|
||||
profile_consumer2;
|
||||
WebDataServiceBase::Handle handle2 =
|
||||
wds_->GetAutofillProfiles(&profile_consumer2);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle2, profile_consumer2.handle());
|
||||
ASSERT_EQ(0U, profile_consumer2.result().size());
|
||||
|
||||
@ -509,7 +508,7 @@ TEST_F(WebDataServiceAutofillTest, AutofillRemoveModifiedBetween) {
|
||||
AutofillWebDataServiceConsumer<std::vector<std::unique_ptr<CreditCard>>>
|
||||
card_consumer2;
|
||||
handle2 = wds_->GetCreditCards(&card_consumer2);
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
EXPECT_EQ(handle2, card_consumer2.handle());
|
||||
ASSERT_EQ(0U, card_consumer2.result().size());
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ class AutofillTypeTraitsTestImpl : public testing::Test,
|
||||
}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
mojo::BindingSet<TypeTraitsTest> bindings_;
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ using ::testing::SizeIs;
|
||||
class ConfigureBottomSheetActionTest : public testing::Test {
|
||||
public:
|
||||
ConfigureBottomSheetActionTest()
|
||||
: task_env_(base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
: task_env_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
|
||||
void SetUp() override {
|
||||
ON_CALL(mock_action_delegate_, GetViewportMode())
|
||||
@ -84,7 +84,7 @@ class ConfigureBottomSheetActionTest : public testing::Test {
|
||||
|
||||
// task_env_ must be first to guarantee other field
|
||||
// creation run in that environment.
|
||||
base::test::ScopedTaskEnvironment task_env_;
|
||||
base::test::TaskEnvironment task_env_;
|
||||
|
||||
MockActionDelegate mock_action_delegate_;
|
||||
MockWebController mock_web_controller_;
|
||||
|
@ -33,7 +33,7 @@ using ::testing::UnorderedElementsAre;
|
||||
class PromptActionTest : public testing::Test {
|
||||
public:
|
||||
PromptActionTest()
|
||||
: task_env_(base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
: task_env_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
|
||||
void SetUp() override {
|
||||
ON_CALL(mock_web_controller_, OnElementCheck(_, _))
|
||||
@ -56,7 +56,7 @@ class PromptActionTest : public testing::Test {
|
||||
protected:
|
||||
// task_env_ must be first to guarantee other field
|
||||
// creation run in that environment.
|
||||
base::test::ScopedTaskEnvironment task_env_;
|
||||
base::test::TaskEnvironment task_env_;
|
||||
|
||||
MockActionDelegate mock_action_delegate_;
|
||||
MockWebController mock_web_controller_;
|
||||
|
@ -33,7 +33,7 @@ using ::testing::SizeIs;
|
||||
class WaitForDocumentActionTest : public testing::Test {
|
||||
public:
|
||||
WaitForDocumentActionTest()
|
||||
: task_env_(base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
: task_env_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
|
||||
void SetUp() override {
|
||||
ON_CALL(mock_action_delegate_, OnWaitForDocumentReadyState(_, _, _))
|
||||
@ -61,7 +61,7 @@ class WaitForDocumentActionTest : public testing::Test {
|
||||
protected:
|
||||
// task_env_ must be first to guarantee other field
|
||||
// creation run in that environment.
|
||||
base::test::ScopedTaskEnvironment task_env_;
|
||||
base::test::TaskEnvironment task_env_;
|
||||
|
||||
MockActionDelegate mock_action_delegate_;
|
||||
WaitForDocumentProto proto_;
|
||||
|
@ -76,8 +76,8 @@ class ControllerTest : public content::RenderViewHostTestHarness {
|
||||
public:
|
||||
ControllerTest()
|
||||
: RenderViewHostTestHarness(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::UI,
|
||||
base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
base::test::TaskEnvironment::MainThreadType::UI,
|
||||
base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
~ControllerTest() override {}
|
||||
|
||||
void SetUp() override {
|
||||
|
@ -68,8 +68,7 @@ ACTION(DoNothing) {}
|
||||
class ElementAreaTest : public testing::Test {
|
||||
protected:
|
||||
ElementAreaTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME),
|
||||
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
|
||||
element_area_(&delegate_) {
|
||||
delegate_.SetWebController(&mock_web_controller_);
|
||||
delegate_.GetMutableSettings()->element_position_update_interval =
|
||||
@ -104,9 +103,9 @@ class ElementAreaTest : public testing::Test {
|
||||
reported_restricted_area_ = restricted_area;
|
||||
}
|
||||
|
||||
// scoped_task_environment_ must be first to guarantee other field
|
||||
// task_environment_ must be first to guarantee other field
|
||||
// creation run in that environment.
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
MockWebController mock_web_controller_;
|
||||
FakeScriptExecutorDelegate delegate_;
|
||||
@ -382,8 +381,7 @@ TEST_F(ElementAreaTest, ElementMovesWithTime) {
|
||||
|
||||
EXPECT_THAT(reported_area_, ElementsAre(MatchingRectF(0, 25, 100, 50)));
|
||||
|
||||
scoped_task_environment_.FastForwardBy(
|
||||
base::TimeDelta::FromMilliseconds(100));
|
||||
task_environment_.FastForwardBy(base::TimeDelta::FromMilliseconds(100));
|
||||
|
||||
// Updated area is available
|
||||
std::vector<RectF> rectangles;
|
||||
|
@ -23,11 +23,10 @@ namespace {
|
||||
class RetryTimerTest : public testing::Test {
|
||||
protected:
|
||||
RetryTimerTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
|
||||
void FastForwardOneSecond() {
|
||||
scoped_task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
|
||||
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
|
||||
}
|
||||
|
||||
base::RepeatingCallback<void(base::OnceCallback<void(bool)>)>
|
||||
@ -65,9 +64,9 @@ class RetryTimerTest : public testing::Test {
|
||||
captured_callback_ = std::move(callback);
|
||||
}
|
||||
|
||||
// scoped_task_environment_ must be first to guarantee other field
|
||||
// task_environment_ must be first to guarantee other field
|
||||
// creation run in that environment.
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
int try_count_ = 0;
|
||||
base::OnceCallback<void(bool)> captured_callback_;
|
||||
|
@ -76,8 +76,7 @@ class ScriptExecutorTest : public testing::Test,
|
||||
|
||||
protected:
|
||||
ScriptExecutorTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
|
||||
|
||||
// Implements ScriptExecutor::Listener
|
||||
void OnServerPayloadChanged(const std::string& global_payload,
|
||||
@ -145,9 +144,9 @@ class ScriptExecutorTest : public testing::Test,
|
||||
interrupts_.emplace_back(std::move(interrupt));
|
||||
}
|
||||
|
||||
// scoped_task_environment_ must be first to guarantee other field
|
||||
// task_environment_ must be first to guarantee other field
|
||||
// creation run in that environment.
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
FakeScriptExecutorDelegate delegate_;
|
||||
Script script_;
|
||||
StrictMock<MockService> mock_service_;
|
||||
@ -364,14 +363,13 @@ TEST_F(ScriptExecutorTest, RunDelayedAction) {
|
||||
// executor_callback_.Run() not expected to be run just yet, as the action is
|
||||
// delayed.
|
||||
executor_->Run(executor_callback_.Get());
|
||||
EXPECT_TRUE(scoped_task_environment_.NextTaskIsDelayed());
|
||||
EXPECT_TRUE(task_environment_.NextTaskIsDelayed());
|
||||
|
||||
// Moving forward in time triggers action execution.
|
||||
EXPECT_CALL(executor_callback_,
|
||||
Run(Field(&ScriptExecutor::Result::success, true)));
|
||||
scoped_task_environment_.FastForwardBy(
|
||||
base::TimeDelta::FromMilliseconds(1000));
|
||||
EXPECT_EQ(scoped_task_environment_.GetPendingMainThreadTaskCount(), 0u);
|
||||
task_environment_.FastForwardBy(base::TimeDelta::FromMilliseconds(1000));
|
||||
EXPECT_EQ(task_environment_.GetPendingMainThreadTaskCount(), 0u);
|
||||
}
|
||||
|
||||
TEST_F(ScriptExecutorTest, ClearDetailsWhenFinished) {
|
||||
@ -533,7 +531,7 @@ TEST_F(ScriptExecutorTest, WaitForDomWaitUntil) {
|
||||
OnElementCheck(Eq(Selector({"element"})), _))
|
||||
.WillRepeatedly(RunOnceCallback<1>(true));
|
||||
EXPECT_CALL(executor_callback_, Run(_));
|
||||
scoped_task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
|
||||
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
|
||||
|
||||
ASSERT_EQ(1u, processed_actions_capture.size());
|
||||
EXPECT_EQ(ACTION_APPLIED, processed_actions_capture[0].status());
|
||||
@ -562,7 +560,7 @@ TEST_F(ScriptExecutorTest, WaitForDomWaitWhile) {
|
||||
OnElementCheck(Eq(Selector({"element"})), _))
|
||||
.WillRepeatedly(RunOnceCallback<1>(false));
|
||||
EXPECT_CALL(executor_callback_, Run(_));
|
||||
scoped_task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
|
||||
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
|
||||
|
||||
ASSERT_EQ(1u, processed_actions_capture.size());
|
||||
EXPECT_EQ(ACTION_APPLIED, processed_actions_capture[0].status());
|
||||
@ -1012,7 +1010,7 @@ TEST_F(ScriptExecutorTest, PauseWaitForDomWhileNavigating) {
|
||||
// timeout.
|
||||
delegate_.UpdateNavigationState(/* navigating= */ true, /* error= */ false);
|
||||
for (int i = 0; i < 5; i++) {
|
||||
scoped_task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
|
||||
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
|
||||
}
|
||||
|
||||
// The end of navigation un-pauses WaitForDom.
|
||||
@ -1166,7 +1164,7 @@ TEST_F(ScriptExecutorTest, ReportNavigationEnd) {
|
||||
EXPECT_CALL(mock_web_controller_,
|
||||
OnElementCheck(Eq(Selector({"element"})), _))
|
||||
.WillOnce(RunOnceCallback<1>(true));
|
||||
scoped_task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
|
||||
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
|
||||
|
||||
ASSERT_THAT(processed_actions_capture, SizeIs(1));
|
||||
EXPECT_EQ(ACTION_APPLIED, processed_actions_capture[0].status());
|
||||
|
@ -271,7 +271,7 @@ class OptOutBlacklistTest : public testing::Test {
|
||||
}
|
||||
|
||||
protected:
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
// Observer to |black_list_|.
|
||||
TestOptOutBlacklistDelegate blacklist_delegate_;
|
||||
|
@ -93,7 +93,7 @@ class OptOutStoreSQLTest : public testing::Test {
|
||||
void TearDown() override { DestroyStore(); }
|
||||
|
||||
protected:
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
// The backing SQL store.
|
||||
std::unique_ptr<OptOutStoreSQL> store_;
|
||||
|
@ -32,7 +32,7 @@ class BookmarkExpandedStateTrackerTest : public testing::Test {
|
||||
void SetUp() override;
|
||||
void TearDown() override;
|
||||
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
TestingPrefServiceSimple prefs_;
|
||||
std::unique_ptr<BookmarkModel> model_;
|
||||
|
||||
|
@ -1231,7 +1231,7 @@ TEST(BookmarkModelLoadTest, TitledUrlIndexPopulatedOnLoad) {
|
||||
// Create a model with a single url.
|
||||
base::ScopedTempDir tmp_dir;
|
||||
ASSERT_TRUE(tmp_dir.CreateUniqueTempDir());
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment;
|
||||
base::test::TaskEnvironment task_environment;
|
||||
std::unique_ptr<BookmarkModel> model =
|
||||
std::make_unique<BookmarkModel>(std::make_unique<TestBookmarkClient>());
|
||||
model->Load(nullptr, tmp_dir.GetPath(), base::ThreadTaskRunnerHandle::Get(),
|
||||
|
@ -27,8 +27,7 @@ namespace bookmarks {
|
||||
class BookmarkNodeDataTest : public testing::Test {
|
||||
public:
|
||||
BookmarkNodeDataTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
|
||||
: task_environment_(base::test::TaskEnvironment::MainThreadType::UI) {}
|
||||
|
||||
void SetUp() override {
|
||||
model_ = TestBookmarkClient::CreateModel();
|
||||
@ -56,7 +55,7 @@ class BookmarkNodeDataTest : public testing::Test {
|
||||
private:
|
||||
base::ScopedTempDir profile_dir_;
|
||||
std::unique_ptr<BookmarkModel> model_;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BookmarkNodeDataTest);
|
||||
};
|
||||
|
@ -32,8 +32,7 @@ class BookmarkUtilsTest : public testing::Test,
|
||||
public BaseBookmarkModelObserver {
|
||||
public:
|
||||
BookmarkUtilsTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::UI),
|
||||
: task_environment_(base::test::TaskEnvironment::MainThreadType::UI),
|
||||
grouped_changes_beginning_count_(0),
|
||||
grouped_changes_ended_count_(0) {}
|
||||
|
||||
@ -74,7 +73,7 @@ class BookmarkUtilsTest : public testing::Test,
|
||||
}
|
||||
|
||||
// Clipboard requires a message loop.
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
int grouped_changes_beginning_count_;
|
||||
int grouped_changes_ended_count_;
|
||||
|
@ -165,7 +165,7 @@ class ManagedBookmarksTrackerTest : public testing::Test {
|
||||
}
|
||||
|
||||
base::ScopedTempDir scoped_temp_dir_;
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
TestingPrefServiceSimple prefs_;
|
||||
std::unique_ptr<BookmarkModel> model_;
|
||||
MockBookmarkModelObserver observer_;
|
||||
|
@ -65,7 +65,7 @@ class WatcherMetricsProviderWinTest : public testing::Test {
|
||||
}
|
||||
|
||||
protected:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
registry_util::RegistryOverrideManager override_manager_;
|
||||
base::HistogramTester histogram_tester_;
|
||||
};
|
||||
@ -138,7 +138,7 @@ TEST_F(WatcherMetricsProviderWinTest, DeletesExitcodeKeyWhenNotReporting) {
|
||||
provider.OnRecordingDisabled();
|
||||
|
||||
// Flush the task(s).
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
|
||||
// Make sure the subkey for the pseudo process has been deleted on reporting.
|
||||
ASSERT_EQ(ERROR_FILE_NOT_FOUND,
|
||||
|
@ -50,7 +50,7 @@ class BrowsingDataUtilsTest : public testing::Test {
|
||||
PrefService* prefs() { return &prefs_; }
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
sync_preferences::TestingPrefServiceSyncable prefs_;
|
||||
};
|
||||
|
||||
|
@ -104,7 +104,7 @@ class BrowsingDataCounterTest : public testing::Test {
|
||||
private:
|
||||
std::unique_ptr<TestingPrefServiceSimple> pref_service_;
|
||||
std::unique_ptr<MockBrowsingDataCounter> counter_;
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
};
|
||||
|
||||
TEST_F(BrowsingDataCounterTest, NoResponse) {
|
||||
|
@ -60,7 +60,7 @@ class HistoryNoticeUtilsTest : public ::testing::Test {
|
||||
std::unique_ptr<syncer::TestSyncService> sync_service_;
|
||||
std::unique_ptr<history::FakeWebHistoryService> history_service_;
|
||||
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
};
|
||||
|
||||
TEST_F(HistoryNoticeUtilsTest, NotSyncing) {
|
||||
|
@ -114,7 +114,7 @@ class CaptivePortalDetectorTest : public testing::Test,
|
||||
}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
std::unique_ptr<CaptivePortalDetector> detector_;
|
||||
};
|
||||
|
||||
|
@ -73,8 +73,7 @@ MATCHER_P(HasPayloadUtf8, payload, "") {
|
||||
class CastMessageHandlerTest : public testing::Test {
|
||||
public:
|
||||
CastMessageHandlerTest()
|
||||
: thread_bundle_(
|
||||
base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME),
|
||||
: thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
|
||||
cast_socket_service_(new base::TestSimpleTaskRunner()),
|
||||
handler_(&cast_socket_service_,
|
||||
/* connector */ nullptr,
|
||||
|
@ -166,7 +166,7 @@ class CastTransportTest : public testing::Test {
|
||||
run_loop.RunUntilIdle();
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
MockCastTransportDelegate* delegate_;
|
||||
MockSocket mock_socket_;
|
||||
Logger* logger_;
|
||||
|
@ -98,7 +98,7 @@ class KeepAliveDelegateTest : public testing::Test {
|
||||
run_loop.RunUntilIdle();
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
MockCastSocket socket_;
|
||||
std::unique_ptr<KeepAliveDelegate> keep_alive_;
|
||||
scoped_refptr<Logger> logger_;
|
||||
|
@ -39,8 +39,8 @@ class ChromeRequireCTDelegateTest : public ::testing::Test {
|
||||
}
|
||||
|
||||
protected:
|
||||
base::test::ScopedTaskEnvironment task_environment_{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO};
|
||||
base::test::TaskEnvironment task_environment_{
|
||||
base::test::TaskEnvironment::MainThreadType::IO};
|
||||
scoped_refptr<net::X509Certificate> cert_;
|
||||
net::HashValueVector hashes_;
|
||||
};
|
||||
|
@ -160,7 +160,7 @@ class JpegEncodeAcceleratorTestEnvironment : public ::testing::Environment {
|
||||
};
|
||||
|
||||
void JpegEncodeAcceleratorTestEnvironment::SetUp() {
|
||||
// Since base::test::ScopedTaskEnvironment will call
|
||||
// Since base::test::TaskEnvironment will call
|
||||
// TestTimeouts::action_max_timeout(), TestTimeouts::Initialize() needs to be
|
||||
// called in advance.
|
||||
TestTimeouts::Initialize();
|
||||
@ -680,7 +680,7 @@ class JpegEncodeAcceleratorTest : public ::testing::Test {
|
||||
|
||||
// This is needed to allow the usage of methods in post_task.h in
|
||||
// JpegEncodeAccelerator implementations.
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
// The elements of |test_aligned_images_| and |test_images_| are
|
||||
// owned by JpegEncodeAcceleratorTestEnvironment.
|
||||
|
@ -46,7 +46,7 @@ class MojoMjpegDecodeAcceleratorServiceTest : public ::testing::Test {
|
||||
private:
|
||||
// This is required to allow base::ThreadTaskRunnerHandle::Get() from the
|
||||
// test execution thread.
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
};
|
||||
|
||||
TEST_F(MojoMjpegDecodeAcceleratorServiceTest, InitializeAndDecode) {
|
||||
|
@ -200,7 +200,7 @@ class ComponentInstallerTest : public testing::Test {
|
||||
void Unpack(const base::FilePath& crx_path);
|
||||
ComponentUnpacker::Result result() const { return result_; }
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
private:
|
||||
void UnpackComplete(const ComponentUnpacker::Result& result);
|
||||
@ -357,7 +357,7 @@ TEST_F(ComponentInstallerTest, UnpackPathInstallSuccess) {
|
||||
EXPECT_EQ(0, result.error);
|
||||
}));
|
||||
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
|
||||
EXPECT_FALSE(base::PathExists(unpack_path));
|
||||
EXPECT_CALL(update_client(), Stop()).Times(1);
|
||||
@ -388,7 +388,7 @@ TEST_F(ComponentInstallerTest, UnpackPathInstallError) {
|
||||
result.error);
|
||||
}));
|
||||
|
||||
scoped_task_environment_.RunUntilIdle();
|
||||
task_environment_.RunUntilIdle();
|
||||
|
||||
EXPECT_FALSE(base::PathExists(unpack_path));
|
||||
EXPECT_CALL(update_client(), Stop()).Times(1);
|
||||
|
@ -165,7 +165,7 @@ class ComponentUpdaterTest : public testing::Test {
|
||||
const UpdateScheduler::UserTask& user_task,
|
||||
const UpdateScheduler::OnStopTaskCallback& on_stop);
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
base::RunLoop runloop_;
|
||||
|
||||
scoped_refptr<TestConfigurator> config_ =
|
||||
@ -257,7 +257,7 @@ void ComponentUpdaterTest::RunThreads() {
|
||||
|
||||
void ComponentUpdaterTest::RunUpdateTask(
|
||||
const UpdateScheduler::UserTask& user_task) {
|
||||
scoped_task_environment_.GetMainThreadTaskRunner()->PostTask(
|
||||
task_environment_.GetMainThreadTaskRunner()->PostTask(
|
||||
FROM_HERE, base::BindRepeating(
|
||||
[](const UpdateScheduler::UserTask& user_task,
|
||||
ComponentUpdaterTest* test) {
|
||||
|
@ -19,12 +19,11 @@ namespace component_updater {
|
||||
class ComponentUpdaterTimerTest : public testing::Test {
|
||||
public:
|
||||
ComponentUpdaterTimerTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
|
||||
: task_environment_(base::test::TaskEnvironment::MainThreadType::UI) {}
|
||||
~ComponentUpdaterTimerTest() override {}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
};
|
||||
|
||||
TEST_F(ComponentUpdaterTimerTest, Start) {
|
||||
|
@ -164,7 +164,7 @@ class ConsentSyncBridgeImplTest : public testing::Test {
|
||||
}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
testing::NiceMock<MockModelTypeChangeProcessor> mock_processor_;
|
||||
std::unique_ptr<ConsentSyncBridgeImpl> bridge_;
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ class ContentCaptureStructTraitsTest : public testing::Test,
|
||||
std::move(callback).Run(i);
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
mojo::BindingSet<TraitsTestService> traits_test_bindings_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ContentCaptureStructTraitsTest);
|
||||
|
@ -93,7 +93,7 @@ class CookieSettingsTest : public testing::Test {
|
||||
|
||||
// There must be a valid ThreadTaskRunnerHandle in HostContentSettingsMap's
|
||||
// scope.
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
sync_preferences::TestingPrefServiceSyncable prefs_;
|
||||
scoped_refptr<HostContentSettingsMap> settings_map_;
|
||||
|
@ -45,8 +45,7 @@ class CrashMetricsReporterObserver : public CrashMetricsReporter::Observer {
|
||||
class CrashMetricsReporterTest : public testing::Test {
|
||||
public:
|
||||
CrashMetricsReporterTest()
|
||||
: scoped_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
|
||||
: scoped_environment_(base::test::TaskEnvironment::MainThreadType::UI) {}
|
||||
~CrashMetricsReporterTest() override {}
|
||||
|
||||
protected:
|
||||
@ -82,7 +81,7 @@ class CrashMetricsReporterTest : public testing::Test {
|
||||
}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment scoped_environment_;
|
||||
base::test::TaskEnvironment scoped_environment_;
|
||||
DISALLOW_COPY_AND_ASSIGN(CrashMetricsReporterTest);
|
||||
};
|
||||
|
||||
|
@ -80,7 +80,7 @@ class HostCachePersistenceManagerTest : public testing::Test {
|
||||
|
||||
static const char kPrefName[];
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
base::ScopedMockTimeMessageLoopTaskRunner task_runner_;
|
||||
|
||||
// The HostCache and PrefService have to outlive the
|
||||
|
@ -43,7 +43,7 @@ class RunnablesTest : public ::testing::Test {
|
||||
bool callback_called() const { return callback_called_; }
|
||||
|
||||
// Provide a message loop for use by TestExecutor instances.
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
private:
|
||||
bool callback_called_ = false;
|
||||
|
@ -27,8 +27,8 @@ class BufferTest : public ::testing::Test {
|
||||
|
||||
// Provide a task environment for use by TestExecutor instances. Do not
|
||||
// initialize the ThreadPool as this is done by the Cronet_Engine
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_{
|
||||
base::test::ScopedTaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY};
|
||||
base::test::TaskEnvironment task_environment_{
|
||||
base::test::TaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY};
|
||||
|
||||
private:
|
||||
void set_on_destroy_called(bool value) { on_destroy_called_ = value; }
|
||||
|
@ -24,8 +24,8 @@ class ExecutorsTest : public ::testing::Test {
|
||||
|
||||
// Provide a task environment for use by TestExecutor instances. Do not
|
||||
// initialize the ThreadPool as this is done by the Cronet_Engine
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_{
|
||||
base::test::ScopedTaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY};
|
||||
base::test::TaskEnvironment task_environment_{
|
||||
base::test::TaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY};
|
||||
|
||||
private:
|
||||
void set_runnable_called(bool value) { runnable_called_ = value; }
|
||||
|
@ -486,8 +486,8 @@ class UrlRequestTest : public ::testing::TestWithParam<
|
||||
protected:
|
||||
// Provide a task environment for use by TestExecutor instances. Do not
|
||||
// initialize the ThreadPool as this is done by the Cronet_Engine
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_{
|
||||
base::test::ScopedTaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY};
|
||||
base::test::TaskEnvironment task_environment_{
|
||||
base::test::TaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY};
|
||||
|
||||
// Not owned, |request_finished_listener_| destroys itself when run. This
|
||||
// pointer is only needed to unregister the listener from the Engine in
|
||||
|
@ -131,8 +131,7 @@ class MockHostResolverProc : public net::HostResolverProc {
|
||||
class StaleHostResolverTest : public testing::Test {
|
||||
protected:
|
||||
StaleHostResolverTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO),
|
||||
: task_environment_(base::test::TaskEnvironment::MainThreadType::IO),
|
||||
mock_network_change_notifier_(
|
||||
net::test::MockNetworkChangeNotifier::Create()),
|
||||
mock_proc_(new MockHostResolverProc(net::OK)),
|
||||
@ -339,7 +338,7 @@ class StaleHostResolverTest : public testing::Test {
|
||||
|
||||
private:
|
||||
// Needed for HostResolver to run HostResolverProc callbacks.
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
base::SimpleTestTickClock tick_clock_;
|
||||
std::unique_ptr<net::test::MockNetworkChangeNotifier>
|
||||
mock_network_change_notifier_;
|
||||
|
@ -57,8 +57,8 @@ bool JsonHeaderEquals(base::StringPiece expected, base::StringPiece actual) {
|
||||
} // namespace
|
||||
|
||||
TEST(URLRequestContextConfigTest, TestExperimentalOptionParsing) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
// Create JSON for experimental options.
|
||||
base::DictionaryValue options;
|
||||
@ -290,8 +290,8 @@ TEST(URLRequestContextConfigTest, TestExperimentalOptionParsing) {
|
||||
}
|
||||
|
||||
TEST(URLRequestContextConfigTest, SetSupportedQuicVersion) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
@ -343,8 +343,8 @@ TEST(URLRequestContextConfigTest, SetSupportedQuicVersion) {
|
||||
}
|
||||
|
||||
TEST(URLRequestContextConfigTest, SetUnsupportedQuicVersion) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
@ -396,8 +396,8 @@ TEST(URLRequestContextConfigTest, SetUnsupportedQuicVersion) {
|
||||
}
|
||||
|
||||
TEST(URLRequestContextConfigTest, SetQuicServerMigrationOptions) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
@ -457,8 +457,8 @@ TEST(URLRequestContextConfigTest, SetQuicServerMigrationOptions) {
|
||||
#endif
|
||||
TEST(URLRequestContextConfigTest,
|
||||
MAYBE_SetQuicGoAwaySessionsOnIPChangeByDefault) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
@ -519,8 +519,8 @@ TEST(URLRequestContextConfigTest,
|
||||
#endif
|
||||
TEST(URLRequestContextConfigTest,
|
||||
MAYBE_SetQuicGoAwaySessionsOnIPChangeViaExperimentOptions) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
@ -581,8 +581,8 @@ TEST(URLRequestContextConfigTest,
|
||||
#endif
|
||||
TEST(URLRequestContextConfigTest,
|
||||
MAYBE_DisableQuicGoAwaySessionsOnIPChangeViaExperimentOptions) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
@ -633,8 +633,8 @@ TEST(URLRequestContextConfigTest,
|
||||
}
|
||||
|
||||
TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationV2Options) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
@ -707,8 +707,8 @@ TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationV2Options) {
|
||||
}
|
||||
|
||||
TEST(URLRequestContextConfigTest, SetQuicStaleDNSracing) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
@ -758,8 +758,8 @@ TEST(URLRequestContextConfigTest, SetQuicStaleDNSracing) {
|
||||
}
|
||||
|
||||
TEST(URLRequestContextConfigTest, SetQuicHostWhitelist) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
@ -810,8 +810,8 @@ TEST(URLRequestContextConfigTest, SetQuicHostWhitelist) {
|
||||
}
|
||||
|
||||
TEST(URLRequestContextConfigTest, SetQuicMaxTimeBeforeCryptoHandshake) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
@ -866,8 +866,8 @@ TEST(URLRequestContextConfigTest, SetQuicMaxTimeBeforeCryptoHandshake) {
|
||||
}
|
||||
|
||||
TEST(URLURLRequestContextConfigTest, SetQuicConnectionOptions) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
@ -928,8 +928,8 @@ TEST(URLURLRequestContextConfigTest, SetQuicConnectionOptions) {
|
||||
}
|
||||
|
||||
TEST(URLURLRequestContextConfigTest, SetAcceptLanguageAndUserAgent) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment_(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
|
||||
URLRequestContextConfig config(
|
||||
// Enable QUIC.
|
||||
|
@ -106,10 +106,9 @@ class TestDataReductionProxyPingbackClientImpl
|
||||
class DataReductionProxyPingbackClientImplTest : public testing::Test {
|
||||
public:
|
||||
DataReductionProxyPingbackClientImplTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME,
|
||||
base::test::ScopedTaskEnvironment::ThreadPoolExecutionMode::ASYNC) {
|
||||
}
|
||||
: task_environment_(
|
||||
base::test::TaskEnvironment::TimeSource::MOCK_TIME,
|
||||
base::test::TaskEnvironment::ThreadPoolExecutionMode::ASYNC) {}
|
||||
|
||||
TestDataReductionProxyPingbackClientImpl* pingback_client() const {
|
||||
return pingback_client_.get();
|
||||
@ -233,7 +232,7 @@ class DataReductionProxyPingbackClientImplTest : public testing::Test {
|
||||
int num_network_requests() { return num_network_requests_; }
|
||||
|
||||
protected:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
private:
|
||||
network::TestURLLoaderFactory test_url_loader_factory_;
|
||||
@ -760,7 +759,7 @@ TEST_F(DataReductionProxyPingbackClientImplTest,
|
||||
false /* black_listed */);
|
||||
|
||||
// Don't report the crash dump details.
|
||||
scoped_task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(5));
|
||||
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(5));
|
||||
|
||||
EXPECT_EQ(upload_content_type(), "application/x-protobuf");
|
||||
RecordPageloadMetricsRequest batched_request;
|
||||
|
2
components/data_reduction_proxy/content/common/data_reduction_proxy_url_loader_throttle_unittest.cc
2
components/data_reduction_proxy/content/common/data_reduction_proxy_url_loader_throttle_unittest.cc
@ -139,7 +139,7 @@ class DataReductionProxyURLLoaderThrottleTest : public ::testing::Test {
|
||||
}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
MockMojoDataReductionProxy mock_mojo_data_reduction_proxy_;
|
||||
};
|
||||
|
||||
|
@ -114,8 +114,7 @@ const char kLastUpdateTime[] = "Wed, 18 Sep 2013 03:45:26";
|
||||
class DataReductionProxyCompressionStatsTest : public testing::Test {
|
||||
protected:
|
||||
DataReductionProxyCompressionStatsTest()
|
||||
: scoped_task_environment_(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::UI) {
|
||||
: task_environment_(base::test::TaskEnvironment::MainThreadType::UI) {
|
||||
EXPECT_TRUE(base::Time::FromString(kLastUpdateTime, &now_));
|
||||
}
|
||||
|
||||
@ -500,7 +499,7 @@ class DataReductionProxyCompressionStatsTest : public testing::Test {
|
||||
}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
std::unique_ptr<DataReductionProxyTestContext> drp_test_context_;
|
||||
std::unique_ptr<DataReductionProxyCompressionStats> compression_stats_;
|
||||
base::Time now_;
|
||||
|
2
components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc
2
components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc
@ -400,7 +400,7 @@ class DataReductionProxyConfigServiceClientTest : public testing::Test {
|
||||
|
||||
private:
|
||||
base::test::ScopedFeatureList scoped_feature_list_;
|
||||
base::test::ScopedTaskEnvironment task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
|
||||
network::TestURLLoaderFactory test_url_loader_factory_;
|
||||
scoped_refptr<network::SharedURLLoaderFactory>
|
||||
|
@ -201,7 +201,7 @@ class DataReductionProxyConfigTest : public testing::Test {
|
||||
}
|
||||
|
||||
content::TestBrowserThreadBundle task_environment_{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO};
|
||||
base::test::TaskEnvironment::MainThreadType::IO};
|
||||
|
||||
std::unique_ptr<DataReductionProxyTestContext> test_context_;
|
||||
|
||||
|
@ -101,7 +101,7 @@ class DataReductionProxyConfiguratorTest : public testing::Test {
|
||||
}
|
||||
|
||||
TestingPrefServiceSimple test_prefs;
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment_;
|
||||
base::test::TaskEnvironment task_environment_;
|
||||
std::unique_ptr<DataReductionProxyTestContext> test_context_;
|
||||
std::unique_ptr<DataReductionProxyConfigurator> config_;
|
||||
std::unique_ptr<NetworkPropertiesManager> manager_;
|
||||
|
@ -26,8 +26,8 @@ class DataReductionProxyDataTest : public testing::Test {
|
||||
DataReductionProxyDataTest() {}
|
||||
|
||||
private:
|
||||
base::test::ScopedTaskEnvironment task_environment_{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO};
|
||||
base::test::TaskEnvironment task_environment_{
|
||||
base::test::TaskEnvironment::MainThreadType::IO};
|
||||
};
|
||||
|
||||
TEST_F(DataReductionProxyDataTest, BasicSettersAndGetters) {
|
||||
|
@ -173,8 +173,8 @@ class DataReductionProxyRequestOptionsTest : public testing::Test {
|
||||
EXPECT_EQ(expected_header, header_value);
|
||||
}
|
||||
|
||||
base::test::ScopedTaskEnvironment task_environment_{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO};
|
||||
base::test::TaskEnvironment task_environment_{
|
||||
base::test::TaskEnvironment::MainThreadType::IO};
|
||||
std::unique_ptr<TestDataReductionProxyRequestOptions> request_options_;
|
||||
std::unique_ptr<DataReductionProxyTestContext> test_context_;
|
||||
net::HttpRequestHeaders callback_headers_;
|
||||
|
@ -72,7 +72,7 @@ class DataReductionProxyServiceTest : public testing::Test {
|
||||
PrefService* prefs() { return &prefs_; }
|
||||
|
||||
protected:
|
||||
content::TestBrowserThreadBundle scoped_task_environment_;
|
||||
content::TestBrowserThreadBundle task_environment_;
|
||||
|
||||
private:
|
||||
TestingPrefServiceSimple prefs_;
|
||||
|
@ -129,8 +129,8 @@ TEST(DataReductionProxySettingsStandaloneTest, TestEndToEndSecureProxyCheck) {
|
||||
data_reduction_proxy::switches::kDataReductionProxyHttpProxies,
|
||||
kHttpsProxy.ToURI() + ";" + kHttpProxy.ToURI());
|
||||
|
||||
base::test::ScopedTaskEnvironment task_environment{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO};
|
||||
base::test::TaskEnvironment task_environment{
|
||||
base::test::TaskEnvironment::MainThreadType::IO};
|
||||
struct TestCase {
|
||||
const char* response_headers;
|
||||
const char* response_body;
|
||||
@ -200,8 +200,8 @@ TEST(DataReductionProxySettingsStandaloneTest, TestEndToEndSecureProxyCheck) {
|
||||
}
|
||||
|
||||
TEST(DataReductionProxySettingsStandaloneTest, TestOnProxyEnabledPrefChange) {
|
||||
base::test::ScopedTaskEnvironment task_environment{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO};
|
||||
base::test::TaskEnvironment task_environment{
|
||||
base::test::TaskEnvironment::MainThreadType::IO};
|
||||
std::unique_ptr<DataReductionProxyTestContext> drp_test_context =
|
||||
DataReductionProxyTestContext::Builder()
|
||||
.WithMockConfig()
|
||||
@ -232,8 +232,8 @@ TEST(DataReductionProxySettingsStandaloneTest, TestOnProxyEnabledPrefChange) {
|
||||
}
|
||||
|
||||
TEST(DataReductionProxySettingsStandaloneTest, TestIsProxyEnabledOrManaged) {
|
||||
base::test::ScopedTaskEnvironment task_environment{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO};
|
||||
base::test::TaskEnvironment task_environment{
|
||||
base::test::TaskEnvironment::MainThreadType::IO};
|
||||
std::unique_ptr<DataReductionProxyTestContext> drp_test_context =
|
||||
DataReductionProxyTestContext::Builder()
|
||||
.WithMockConfig()
|
||||
@ -273,8 +273,8 @@ TEST(DataReductionProxySettingsStandaloneTest, TestIsProxyEnabledOrManaged) {
|
||||
}
|
||||
|
||||
TEST(DataReductionProxySettingsStandaloneTest, TestCanUseDataReductionProxy) {
|
||||
base::test::ScopedTaskEnvironment task_environment{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO};
|
||||
base::test::TaskEnvironment task_environment{
|
||||
base::test::TaskEnvironment::MainThreadType::IO};
|
||||
std::unique_ptr<DataReductionProxyTestContext> drp_test_context =
|
||||
DataReductionProxyTestContext::Builder()
|
||||
.WithMockConfig()
|
||||
@ -475,8 +475,8 @@ TEST_F(DataReductionProxySettingsTest, TestDaysSinceEnabledWithTestClock) {
|
||||
// that already have data reduction proxy on.
|
||||
TEST(DataReductionProxySettingsStandaloneTest,
|
||||
TestDaysSinceEnabledExistingUser) {
|
||||
base::test::ScopedTaskEnvironment task_environment{
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO};
|
||||
base::test::TaskEnvironment task_environment{
|
||||
base::test::TaskEnvironment::MainThreadType::IO};
|
||||
std::unique_ptr<DataReductionProxyTestContext> drp_test_context =
|
||||
DataReductionProxyTestContext::Builder()
|
||||
.WithMockConfig()
|
||||
|
@ -41,8 +41,8 @@ TEST(NetworkPropertyTest, TestSetterGetterCaptivePortal) {
|
||||
base::HistogramTester histogram_tester;
|
||||
TestingPrefServiceSimple test_prefs;
|
||||
test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
|
||||
base::test::ScopedTaskEnvironment task_environment(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
TestNetworkPropertiesManager network_properties_manager(&test_prefs);
|
||||
|
||||
std::string network_id("test");
|
||||
@ -92,8 +92,8 @@ TEST(NetworkPropertyTest, TestSetterGetterCaptivePortal) {
|
||||
TEST(NetworkPropertyTest, TestSetterGetterDisallowedByCarrier) {
|
||||
TestingPrefServiceSimple test_prefs;
|
||||
test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
|
||||
base::test::ScopedTaskEnvironment task_environment(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
TestNetworkPropertiesManager network_properties_manager(&test_prefs);
|
||||
|
||||
network_properties_manager.SetIsSecureProxyDisallowedByCarrier(true);
|
||||
@ -110,8 +110,8 @@ TEST(NetworkPropertyTest, TestSetterGetterDisallowedByCarrier) {
|
||||
TEST(NetworkPropertyTest, TestWarmupURLFailedOnSecureCoreProxy) {
|
||||
TestingPrefServiceSimple test_prefs;
|
||||
test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
|
||||
base::test::ScopedTaskEnvironment task_environment(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
TestNetworkPropertiesManager network_properties_manager(&test_prefs);
|
||||
|
||||
network_properties_manager.SetHasWarmupURLProbeFailed(
|
||||
@ -136,8 +136,8 @@ TEST(NetworkPropertyTest, TestWarmupURLFailedOnSecureCoreProxy) {
|
||||
TEST(NetworkPropertyTest, TestWarmupURLFailedOnInSecureCoreProxy) {
|
||||
TestingPrefServiceSimple test_prefs;
|
||||
test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
|
||||
base::test::ScopedTaskEnvironment task_environment(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
TestNetworkPropertiesManager network_properties_manager(&test_prefs);
|
||||
|
||||
EXPECT_TRUE(network_properties_manager.IsInsecureProxyAllowed(true));
|
||||
@ -165,8 +165,8 @@ TEST(NetworkPropertyTest, TestWarmupURLFailedOnInSecureCoreProxy) {
|
||||
TEST(NetworkPropertyTest, TestLimitPrefSize) {
|
||||
TestingPrefServiceSimple test_prefs;
|
||||
test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
|
||||
base::test::ScopedTaskEnvironment task_environment(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
TestNetworkPropertiesManager network_properties_manager(&test_prefs);
|
||||
|
||||
size_t num_network_ids = 100;
|
||||
@ -225,8 +225,8 @@ TEST(NetworkPropertyTest, TestLimitPrefSize) {
|
||||
TEST(NetworkPropertyTest, TestChangeNetworkIDBackAndForth) {
|
||||
TestingPrefServiceSimple test_prefs;
|
||||
test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
|
||||
base::test::ScopedTaskEnvironment task_environment(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
TestNetworkPropertiesManager network_properties_manager(&test_prefs);
|
||||
|
||||
// First network ID has a captive portal.
|
||||
@ -274,8 +274,8 @@ TEST(NetworkPropertyTest, TestChangeNetworkIDBackAndForth) {
|
||||
TEST(NetworkPropertyTest, TestNetworkQualitiesOverwrite) {
|
||||
TestingPrefServiceSimple test_prefs;
|
||||
test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
|
||||
base::test::ScopedTaskEnvironment task_environment(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
TestNetworkPropertiesManager network_properties_manager(&test_prefs);
|
||||
|
||||
// First network ID has a captive portal.
|
||||
@ -325,8 +325,8 @@ TEST(NetworkPropertyTest, TestDeleteHistory) {
|
||||
base::HistogramTester histogram_tester;
|
||||
TestingPrefServiceSimple test_prefs;
|
||||
test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
|
||||
base::test::ScopedTaskEnvironment task_environment(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
TestNetworkPropertiesManager network_properties_manager(&test_prefs);
|
||||
|
||||
std::string network_id("test");
|
||||
@ -383,8 +383,8 @@ TEST(NetworkPropertyTest, TestDeleteOldValues) {
|
||||
|
||||
TestingPrefServiceSimple test_prefs;
|
||||
test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
|
||||
base::test::ScopedTaskEnvironment task_environment(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
TestNetworkPropertiesManager network_properties_manager(&test_clock,
|
||||
&test_prefs);
|
||||
|
||||
@ -443,8 +443,8 @@ TEST(NetworkPropertyTest,
|
||||
|
||||
TestingPrefServiceSimple test_prefs;
|
||||
test_prefs.registry()->RegisterDictionaryPref(prefs::kNetworkProperties);
|
||||
base::test::ScopedTaskEnvironment task_environment(
|
||||
base::test::ScopedTaskEnvironment::MainThreadType::IO);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::MainThreadType::IO);
|
||||
TestNetworkPropertiesManager network_properties_manager(&test_prefs);
|
||||
|
||||
// First network ID has a captive portal and the canary check failed.
|
||||
|
@ -126,7 +126,7 @@ class WarmupURLFetcherTest : public WarmupURLFetcher {
|
||||
|
||||
// Test that query param for the warmup URL is randomly set.
|
||||
TEST(WarmupURLFetcherTest, TestGetWarmupURLWithQueryParam) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment;
|
||||
base::test::TaskEnvironment task_environment;
|
||||
network::TestURLLoaderFactory test_url_loader_factory;
|
||||
WarmupURLFetcherTest warmup_url_fetcher(&test_url_loader_factory);
|
||||
|
||||
@ -157,7 +157,7 @@ TEST(WarmupURLFetcherTest, TestGetWarmupURLWithQueryParam) {
|
||||
}
|
||||
|
||||
TEST(WarmupURLFetcherTest, TestSuccessfulFetchWarmupURLNoViaHeader) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment;
|
||||
base::test::TaskEnvironment task_environment;
|
||||
network::TestURLLoaderFactory test_url_loader_factory;
|
||||
|
||||
base::HistogramTester histogram_tester;
|
||||
@ -167,7 +167,7 @@ TEST(WarmupURLFetcherTest, TestSuccessfulFetchWarmupURLNoViaHeader) {
|
||||
EXPECT_FALSE(warmup_url_fetcher.IsFetchInFlight());
|
||||
warmup_url_fetcher.FetchWarmupURL(0, DataReductionProxyServer(proxy_server));
|
||||
EXPECT_TRUE(warmup_url_fetcher.IsFetchInFlight());
|
||||
scoped_task_environment.RunUntilIdle();
|
||||
task_environment.RunUntilIdle();
|
||||
|
||||
auto resource_response_head =
|
||||
network::CreateResourceResponseHead(net::HTTP_OK);
|
||||
@ -203,7 +203,7 @@ TEST(WarmupURLFetcherTest, TestSuccessfulFetchWarmupURLNoViaHeader) {
|
||||
}
|
||||
|
||||
TEST(WarmupURLFetcherTest, TestSuccessfulFetchWarmupURLWithViaHeader) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment;
|
||||
base::test::TaskEnvironment task_environment;
|
||||
network::TestURLLoaderFactory test_url_loader_factory;
|
||||
|
||||
base::HistogramTester histogram_tester;
|
||||
@ -213,7 +213,7 @@ TEST(WarmupURLFetcherTest, TestSuccessfulFetchWarmupURLWithViaHeader) {
|
||||
EXPECT_FALSE(warmup_url_fetcher.IsFetchInFlight());
|
||||
warmup_url_fetcher.FetchWarmupURL(0, DataReductionProxyServer(proxy_server));
|
||||
EXPECT_TRUE(warmup_url_fetcher.IsFetchInFlight());
|
||||
scoped_task_environment.RunUntilIdle();
|
||||
task_environment.RunUntilIdle();
|
||||
|
||||
auto resource_response_head =
|
||||
network::CreateResourceResponseHead(net::HTTP_NOT_FOUND);
|
||||
@ -255,7 +255,7 @@ TEST(WarmupURLFetcherTest, TestSuccessfulFetchWarmupURLWithViaHeader) {
|
||||
|
||||
TEST(WarmupURLFetcherTest,
|
||||
TestSuccessfulFetchWarmupURLWithViaHeaderExperimentNotEnabled) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment;
|
||||
base::test::TaskEnvironment task_environment;
|
||||
network::TestURLLoaderFactory test_url_loader_factory;
|
||||
|
||||
base::HistogramTester histogram_tester;
|
||||
@ -295,7 +295,7 @@ TEST(WarmupURLFetcherTest,
|
||||
}
|
||||
|
||||
TEST(WarmupURLFetcherTest, TestConnectionResetFetchWarmupURL) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment;
|
||||
base::test::TaskEnvironment task_environment;
|
||||
network::TestURLLoaderFactory test_url_loader_factory;
|
||||
|
||||
base::HistogramTester histogram_tester;
|
||||
@ -337,7 +337,7 @@ TEST(WarmupURLFetcherTest, TestConnectionResetFetchWarmupURL) {
|
||||
}
|
||||
|
||||
TEST(WarmupURLFetcherTest, TestFetchTimesout) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment;
|
||||
base::test::TaskEnvironment task_environment;
|
||||
network::TestURLLoaderFactory test_url_loader_factory;
|
||||
|
||||
base::HistogramTester histogram_tester;
|
||||
@ -372,8 +372,8 @@ TEST(WarmupURLFetcherTest, TestFetchTimesout) {
|
||||
}
|
||||
|
||||
TEST(WarmupURLFetcherTest, TestSuccessfulFetchWarmupURLWithDelay) {
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment(
|
||||
base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME);
|
||||
base::test::TaskEnvironment task_environment(
|
||||
base::test::TaskEnvironment::TimeSource::MOCK_TIME);
|
||||
network::TestURLLoaderFactory test_url_loader_factory;
|
||||
|
||||
base::HistogramTester histogram_tester;
|
||||
@ -383,7 +383,7 @@ TEST(WarmupURLFetcherTest, TestSuccessfulFetchWarmupURLWithDelay) {
|
||||
EXPECT_FALSE(warmup_url_fetcher.IsFetchInFlight());
|
||||
warmup_url_fetcher.SetFetchWaitTime(base::TimeDelta::FromMilliseconds(1));
|
||||
warmup_url_fetcher.FetchWarmupURL(1, DataReductionProxyServer(proxy_server));
|
||||
scoped_task_environment.FastForwardBy(base::TimeDelta::FromMilliseconds(2));
|
||||
task_environment.FastForwardBy(base::TimeDelta::FromMilliseconds(2));
|
||||
|
||||
auto resource_response_head =
|
||||
network::CreateResourceResponseHead(net::HTTP_NOT_FOUND);
|
||||
@ -430,7 +430,7 @@ TEST(WarmupURLFetcherTest, TestFetchTimeoutIncreasing) {
|
||||
|
||||
base::HistogramTester histogram_tester;
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment;
|
||||
base::test::TaskEnvironment task_environment;
|
||||
network::TestURLLoaderFactory test_url_loader_factory;
|
||||
|
||||
DataReductionProxyServer proxy_server(net::ProxyServer::Direct());
|
||||
@ -460,7 +460,7 @@ TEST(WarmupURLFetcherTest, TestFetchTimeoutIncreasing) {
|
||||
TEST(WarmupURLFetcherTest, TestFetchWaitTime) {
|
||||
base::HistogramTester histogram_tester;
|
||||
|
||||
base::test::ScopedTaskEnvironment scoped_task_environment;
|
||||
base::test::TaskEnvironment task_environment;
|
||||
network::TestURLLoaderFactory test_url_loader_factory;
|
||||
|
||||
DataReductionProxyServer proxy_server(net::ProxyServer::Direct());
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user