0

[Browser/WebTaskEnvironment] Mass-migrate away from Test(Browser|Web)ThreadBundle

This is
 1) s/TestBrowserThreadBundle/BrowserTaskEnvironment/ on src/
 2) s/([^/])\b\w*thread_bundle(_)?/\1task_environment\2/ on files modified in (1)
 3) git cl format
 4) Manually fix up remainder "ThreadBundle" and "thread_bundle" found via
    string search on the whole of src/.

For ease of review:
 * Step  is the diff between patch sets 1..2
 * Step  is the diff between patch sets 2..3

TBR=dcheng@chromium.org
(for post-review owners bypass per mechanical change)

Bug: 992483
Change-Id: I4945141f6d78bdc6c98444198e5012ddc8e5bff0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1758440
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688755}
This commit is contained in:
Gabriel Charette
2019-08-20 22:24:04 +00:00
committed by Commit Bot
parent 8bf4984f3a
commit 798fde7bc9
1050 changed files with 2024 additions and 2056 deletions
PRESUBMIT.py
android_webview/browser
base
chrome
browser
after_startup_task_utils_unittest.cc
android
app_controller_mac_unittest.mm
apps
autocomplete
availability
background
background_fetch
background_sync
badging
bitmap_fetcher
bookmarks
browser_about_handler_unittest.cc
browser_switcher
browsing_data
captive_portal
certificate_manager_model_unittest.ccchrome_content_browser_client_unittest.cc
chromeos
android_sms
arc
assistant
attestation
authpolicy
base
child_accounts
crostini
customization
drive
extensions
external_metrics_unittest.cc
file_manager
file_system_provider
fileapi
guest_os
hats
input_method
kerberos
lock_screen_apps
login
net
network_change_manager_client_unittest.cc
plugin_vm
policy
power
preferences_unittest.cc
printing
proxy_config_service_impl_unittest.cc
resource_reporter
settings
smb_client
system
system_logs
tether
wilco_dtc_supportd
component_updater
content_index
content_settings
custom_handlers
devtools
download
engagement
enterprise_reporting
extensions
activity_log
api
app_data_migrator_unittest.ccblacklist_check_unittest.ccblacklist_state_fetcher_unittest.ccblacklist_unittest.ccchrome_extension_cookies.hchrome_info_map_unittest.cccomponent_loader_unittest.ccdefault_apps_unittest.cc
error_console
event_router_forwarder_unittest.ccextension_action_icon_factory_unittest.ccextension_action_manager_unittest.ccextension_gcm_app_handler_unittest.ccextension_icon_manager_unittest.ccextension_install_prompt_unittest.ccextension_management_unittest.ccextension_prefs_unittest.hextension_protocols_unittest.ccextension_service_test_base.ccextension_service_test_base.hextension_service_unittest.ccextension_special_storage_policy_unittest.ccextension_user_script_loader_unittest.ccextension_web_ui_unittest.ccexternal_policy_loader_unittest.ccexternal_pref_loader_unittest.ccexternal_registry_loader_win_unittest.cc
forced_extensions
install_tracker_unittest.ccmenu_manager_unittest.ccpack_extension_unittest.ccpermissions_based_management_policy_provider_unittest.ccstandard_management_policy_provider_unittest.cctest_extension_environment.cctest_extension_environment.hupdate_install_gate_unittest.cc
updater
user_script_listener_unittest.ccwarning_badge_service_unittest.cczipfile_installer_unittest.cc
external_protocol
feature_engagement
file_select_helper_unittest.ccfont_family_cache_unittest.cc
gcm
google
hid
history
importer
language
local_discovery
media
android
cast_remoting_connector_unittest.cccast_transport_host_filter_unittest.ccmedia_engagement_session_unittest.ccmidi_permission_context_unittest.cc
router
webrtc
media_galleries
memory
metrics
native_file_system
net
notifications
offline_pages
optimization_guide
performance_manager
permissions
platform_util_unittest.cc
plugins
policy
predictors
prefs
prerender
previews
printing
process_singleton_posix_unittest.cc
profile_resetter
profiles
profiling_host
push_messaging
resource_coordinator
safe_browsing
search
search_engines
serial
services_unittest.cc
sessions
sharing
shell_integration_linux_unittest.cc
signin
site_isolation
spellchecker
ssl
subresource_filter
supervised_user
sync
sync_file_system
task_manager
themes
tracing
translate
ui
android
app_list
ash
bookmarks
browser_close_unittest.ccchrome_select_file_policy_unittest.cc
cocoa
in_product_help
libgtkui
media_router
page_info
passwords
recently_audible_helper_unittest.cc
search_engines
startup
sync
tabs
toolbar
views
webui
usb
vr
wake_lock
web_applications
win
common
services
test
chromecast/browser
components
arc
autofill
autofill_assistant
cast_channel
data_reduction_proxy
drive
feedback
gcm_driver
metrics
mirroring
nacl
password_manager
payments
printing
safe_browsing
signin
storage_monitor
subresource_filter
translate
visitedlink
web_cache
webrtc_logging
content
browser
accessibility
android
appcache
background_fetch
background_sync
blob_storage
browser_associated_interface_unittest.ccbrowser_thread_impl.ccbrowser_thread_impl.hbrowser_url_handler_impl_unittest.cc
browsing_data
cache_storage
child_process_security_policy_unittest.cc
content_index
cookie_store
devtools
dom_storage
download
fileapi
frame_host
host_zoom_map_impl_unittest.cc
indexed_db
loader
media
native_file_system
net
network_service_client_unittest.cc
notifications
payments
permissions
renderer_host
resolve_proxy_msg_helper_unittest.cc
scheduler
service_worker
site_instance_impl_unittest.cc
speech
storage_partition_impl_map_unittest.ccstorage_partition_impl_unittest.cc
tracing
web_package
webrtc
webui
worker_host
public
renderer
test
docs
extensions
ios
chrome
app
browser
autofill
browsing_data
crash_report
device_sharing
download
installation_notifier_unittest.mm
itunes_urls
language
main
metrics
net
ntp
omaha
overlays
overscroll_actions
payments
prerender
reading_list
search_engines
signin
snapshots
sync
tabs
ui
activity_services
authentication
bookmarks
browser_container
browser_view
content_suggestions
download
first_run
location_bar
main
ntp
open_in
overlays
web_content_area
promos
reading_list
recent_tabs
sad_tab
settings
side_swipe
static_content
tab_grid
tabs
toolbar
translate
voice
url_loading
web
web_state_list
test
web
web_view
net/url_request
services/network
ui/views

@ -971,7 +971,7 @@ _BANNED_CPP_FUNCTIONS = (
'RunAllPendingInMessageLoop(BrowserThread',
(
'RunAllPendingInMessageLoop is deprecated. Use RunLoop for',
'BrowserThread::UI, TestBrowserThreadBundle::RunIOThreadUntilIdle',
'BrowserThread::UI, BrowserTaskEnvironment::RunIOThreadUntilIdle',
'for BrowserThread::IO, and prefer RunLoop::QuitClosure to observe',
'async events instead of flushing threads.',
),

@ -28,7 +28,7 @@ class AwBrowserContextTest : public testing::Test {
void TearDown() override { delete test_content_client_initializer_; }
// Create the TestBrowserThreads.
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
content::TestContentClientInitializer* test_content_client_initializer_;
AwBrowserProcess* browser_process_;
};

@ -48,7 +48,7 @@ class AwContentsClientBridgeTest : public Test {
void SetUp() override;
void TestCertType(SSLClientCertType type, const std::string& expected_name);
// Create the TestBrowserThreads. Just instantiate the member variable.
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
base::android::ScopedJavaGlobalRef<jobject> jbridge_;
std::unique_ptr<AwContentsClientBridge> bridge_;
scoped_refptr<SSLCertRequestInfo> cert_request_info_;

@ -18,7 +18,7 @@
#include "build/build_config.h"
namespace web {
class TestWebThreadBundle;
class WebTaskEnvironment;
}
namespace base {
@ -187,7 +187,7 @@ class BASE_EXPORT MessageLoopCurrent {
friend class Thread;
friend class sequence_manager::internal::SequenceManagerImpl;
friend class MessageLoopTaskRunnerTest;
friend class web::TestWebThreadBundle;
friend class web::WebTaskEnvironment;
sequence_manager::internal::SequenceManagerImpl* current_;
};

@ -20,7 +20,7 @@ class TaskQueue;
} // namespace sequence_manager
// A simple single thread TaskExecutor intended for non-test usage. Tests should
// generally use TaskEnvironment or TestBrowserThreadBundle instead.
// generally use TaskEnvironment or BrowserTaskEnvironment instead.
// TODO(alexclarke): Inherit from TaskExecutor to support base::Here().
class BASE_EXPORT SingleThreadTaskExecutor {
public:

@ -128,7 +128,7 @@ class AfterStartupTaskTest : public testing::Test {
loop->Quit();
}
content::TestBrowserThreadBundle browser_thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
};
TEST_F(AfterStartupTaskTest, IsStartupComplete) {

@ -79,7 +79,7 @@ class PartnerBookmarksShimTest : public testing::Test {
std::unique_ptr<TestingProfile> profile_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
BookmarkModel* model_;
MockObserver observer_;

@ -47,7 +47,7 @@ class ChromeBackupAgentTest : public ::testing::Test {
registry_->RegisterBooleanPref("dummy", false);
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::vector<std::string> expected_pref_names_;
TestingProfileManager testing_profile_manager_;
TestingProfile* testing_profile_;

@ -193,7 +193,7 @@ void WatchPathAndReportHeaders(const std::string& path,
class DetachedResourceRequestTest : public ::testing::Test {
public:
DetachedResourceRequestTest()
: thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {}
: task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD) {}
~DetachedResourceRequestTest() override = default;
void SetUp() override {
@ -288,7 +288,7 @@ class DetachedResourceRequestTest : public ::testing::Test {
private:
std::unique_ptr<TestingProfile> profile_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<content::TestHostResolver> host_resolver_;
std::unique_ptr<net::EmbeddedTestServer> test_server_;
};

@ -144,7 +144,7 @@ class AvailableOfflineContentTest : public testing::Test {
return std::make_tuple(list_visible_by_prefs, std::move(suggestions));
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_ =
std::make_unique<base::test::ScopedFeatureList>();

@ -24,7 +24,7 @@ using testing::_;
class NTPJsonFetcherTest : public testing::Test {
public:
NTPJsonFetcherTest()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
: task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
https_server_(net::EmbeddedTestServer::TYPE_HTTPS) {}
void SetUp() {
@ -107,7 +107,7 @@ class NTPJsonFetcherTest : public testing::Test {
std::unique_ptr<NTPCatalog> catalog_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile browser_context_;
net::EmbeddedTestServer https_server_;

@ -57,7 +57,7 @@ class FeedHistoryHelperTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
history::HistoryService* history_service_;
TestingProfile profile_;
std::unique_ptr<FeedHistoryHelper> feed_history_helper_;

@ -83,7 +83,8 @@ class DataObserverTest : public testing::Test {
}
protected:
content::TestBrowserThreadBundle thread_bundle_; // To set up BrowserThreads.
content::BrowserTaskEnvironment
task_environment_; // To set up BrowserThreads.
base::ScopedTempDir temp_dir_;
std::unique_ptr<MockDeltaFileService> delta_file_service_;

@ -53,7 +53,8 @@ class LocaleTemplateUrlLoaderTest : public testing::Test {
TemplateURLService* model() { return test_util_->model(); }
private:
content::TestBrowserThreadBundle thread_bundle_; // To set up BrowserThreads.
content::BrowserTaskEnvironment
task_environment_; // To set up BrowserThreads.
std::unique_ptr<LocaleTemplateUrlLoader> loader_;
std::unique_ptr<TemplateURLServiceTestUtil> test_util_;

@ -106,7 +106,7 @@ class PasswordUIViewAndroidTest : public ::testing::Test {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfileManager testing_profile_manager_;
TestingProfile* testing_profile_;
JNIEnv* env_;

@ -161,7 +161,7 @@ class SearchPermissionsServiceTest : public testing::Test {
private:
std::unique_ptr<TestingProfile> profile_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
// This is owned by the SearchPermissionsService which is owned by the
// profile.

@ -98,7 +98,7 @@ class SigninManagerAndroidTest : public ::testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfileManager profile_manager_;
TestingProfile* profile_; // Owned by |profile_manager_|.

@ -73,7 +73,7 @@ class WebApkIconHasherRunner {
class WebApkIconHasherTest : public ::testing::Test {
public:
WebApkIconHasherTest()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
: task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
~WebApkIconHasherTest() override {}
protected:
@ -82,7 +82,7 @@ class WebApkIconHasherTest : public ::testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
network::TestURLLoaderFactory test_url_loader_factory_;
DISALLOW_COPY_AND_ASSIGN(WebApkIconHasherTest);

@ -270,7 +270,7 @@ class WebApkInstallerTest : public ::testing::Test {
WebApkResponseBuilder;
WebApkInstallerTest()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
: task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
~WebApkInstallerTest() override {}
void SetUp() override {
@ -338,7 +338,7 @@ class WebApkInstallerTest : public ::testing::Test {
}
std::unique_ptr<TestingProfile> profile_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
net::EmbeddedTestServer test_server_;
// Builds response to the WebAPK creation request.

@ -39,7 +39,7 @@ class AppControllerTest : public PlatformTest {
PlatformTest::TearDown();
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfileManager profile_manager_;
TestingProfile* profile_;
};

@ -399,7 +399,7 @@ class ExtensionAppShimHandlerTest : public testing::Test {
handler_->OnShimSetHidden(host, hidden);
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
MockDelegate* delegate_;
std::unique_ptr<TestingExtensionAppShimHandler> handler_;
base::FilePath profile_path_a_;

@ -69,7 +69,7 @@ class UserTypeFilterTest : public testing::Test {
private:
// To support context of browser threads.
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
DISALLOW_COPY_AND_ASSIGN(UserTypeFilterTest);
};

@ -63,7 +63,7 @@ class ChromeAutocompleteProviderClientTest : public testing::Test {
}
protected:
content::TestBrowserThreadBundle test_browser_thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> profile_;
std::unique_ptr<ChromeAutocompleteProviderClient> client_;

@ -26,7 +26,7 @@ class ChromeAutocompleteSchemeClassifierTest : public testing::Test {
}
protected:
content::TestBrowserThreadBundle test_browser_thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> profile_;
std::unique_ptr<ChromeAutocompleteSchemeClassifier> scheme_classifier_;
};

@ -279,7 +279,7 @@ class BaseSearchProviderTest : public testing::Test,
const base::string16 keyword_term_;
GURL keyword_url_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
network::TestURLLoaderFactory test_url_loader_factory_;
TestingProfile profile_;

@ -57,7 +57,7 @@ class ShortcutsProviderExtensionTest : public testing::Test {
void SetUp() override;
void TearDown() override;
content::TestBrowserThreadBundle test_browser_thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
ChromeAutocompleteProviderClient client_;
scoped_refptr<ShortcutsBackend> backend_;

@ -88,7 +88,7 @@ class TestAvailabilityProber : public AvailabilityProber {
class AvailabilityProberTest : public testing::Test {
public:
AvailabilityProberTest()
: thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
test_shared_loader_factory_(
base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
&test_url_loader_factory_)),
@ -129,17 +129,17 @@ class AvailabilityProberTest : public testing::Test {
AvailabilityProber::ClientName::kLitepages, kTestUrl,
AvailabilityProber::HttpMethod::kGet, headers, retry_policy,
timeout_policy, TRAFFIC_ANNOTATION_FOR_TESTS, 1,
kCacheRevalidateAfter, thread_bundle_.GetMockTickClock(),
thread_bundle_.GetMockClock());
kCacheRevalidateAfter, task_environment_.GetMockTickClock(),
task_environment_.GetMockClock());
prober->SetOnCompleteCallback(base::BindRepeating(
&AvailabilityProberTest::OnProbeComplete, base::Unretained(this)));
return prober;
}
void RunUntilIdle() { thread_bundle_.RunUntilIdle(); }
void RunUntilIdle() { task_environment_.RunUntilIdle(); }
void FastForward(base::TimeDelta delta) {
thread_bundle_.FastForwardBy(delta);
task_environment_.FastForwardBy(delta);
}
void MakeResponseAndWait(net::HttpStatusCode http_status,
@ -198,7 +198,7 @@ class AvailabilityProberTest : public testing::Test {
base::Optional<bool> callback_result() { return callback_result_; }
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
network::TestURLLoaderFactory test_url_loader_factory_;
scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_;
TestDelegate test_delegate_;

@ -61,7 +61,7 @@ class BackgroundContentsServiceTest : public testing::Test {
return url;
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<base::CommandLine> command_line_;
};

@ -181,7 +181,7 @@ class BackgroundModeManagerTest : public testing::Test {
}
protected:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<base::CommandLine> command_line_;
std::unique_ptr<TestingProfileManager> profile_manager_;
@ -270,7 +270,7 @@ class BackgroundModeManagerWithExtensionsTest : public testing::Test {
private:
// Required for extension service.
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
// BackgroundModeManager actually affects Chrome start/stop state,
// tearing down our thread bundle before we've had chance to clean

@ -51,7 +51,7 @@ class BackgroundFetchDelegateImplTest : public testing::Test {
protected:
// This is used to specify the main thread type of the tests as the UI
// thread.
content::TestBrowserThreadBundle threads_;
content::BrowserTaskEnvironment threads_;
std::unique_ptr<ukm::TestAutoSetUkmRecorder> recorder_;
BackgroundFetchDelegateImpl* delegate_;

@ -52,7 +52,7 @@ std::unique_ptr<KeyedService> BuildTestHistoryService(
class BackgroundSyncControllerImplTest : public testing::Test {
protected:
BackgroundSyncControllerImplTest()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
: task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {
ResetFieldTrialList();
#if defined(OS_ANDROID)
BackgroundSyncLauncherAndroid::SetPlayServicesVersionCheckDisabledForTests(
@ -93,7 +93,7 @@ class BackgroundSyncControllerImplTest : public testing::Test {
return registration;
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
std::unique_ptr<BackgroundSyncControllerImpl> controller_;
std::unique_ptr<base::FieldTrialList> field_trial_list_;

@ -83,7 +83,7 @@ class BadgeManagerUnittest : public ::testing::Test {
private:
TestBadgeManagerDelegate* delegate_;
BadgeManager* badge_manager_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> profile_;
DISALLOW_COPY_AND_ASSIGN(BadgeManagerUnittest);

@ -118,7 +118,7 @@ class BitmapFetcherServiceTest : public testing::Test,
const GURL url2_;
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
};

@ -149,7 +149,7 @@ class BookmarksObserver : public BookmarksExportObserver {
// Tests bookmark_html_writer by populating a BookmarkModel, writing it out by
// way of bookmark_html_writer, then using the importer to read it back in.
TEST_F(BookmarkHTMLWriterTest, Test) {
content::TestBrowserThreadBundle thread_bundle;
content::BrowserTaskEnvironment task_environment;
TestingProfile profile;
ASSERT_TRUE(profile.CreateHistoryService(true, false));

@ -37,7 +37,7 @@ using testing::_;
TEST(ManagedBookmarkServiceNoPolicyTest, EmptyManagedNode) {
// Verifies that the managed node is empty and invisible when the policy is
// not set.
content::TestBrowserThreadBundle thread_bundle;
content::BrowserTaskEnvironment task_environment;
TestingProfile profile;
// Make sure the policy isn't set.
@ -151,7 +151,7 @@ class ManagedBookmarkServiceTest : public testing::Test {
return dict->GetString("url", &url) && node->url() == url;
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
sync_preferences::TestingPrefServiceSyncable* prefs_;
bookmarks::MockBookmarkModelObserver observer_;

@ -47,7 +47,7 @@ class BrowserAboutHandlerTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
};
TEST_F(BrowserAboutHandlerTest, WillHandleBrowserAboutURL) {

@ -77,7 +77,7 @@ class BrowserSwitcherPrefsTest : public testing::Test {
BrowserSwitcherPrefs* prefs() { return prefs_.get(); }
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
sync_preferences::TestingPrefServiceSyncable prefs_backend_;

@ -23,13 +23,13 @@
class CannedBrowsingDataAppCacheHelperTest : public testing::Test {
public:
CannedBrowsingDataAppCacheHelperTest()
: thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {}
: task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD) {}
void TearDown() override {
// Make sure we run all pending tasks on IO thread before testing
// profile is destructed.
content::RunAllPendingInMessageLoop(content::BrowserThread::IO);
thread_bundle_.RunUntilIdle();
task_environment_.RunUntilIdle();
}
protected:
@ -49,7 +49,7 @@ class CannedBrowsingDataAppCacheHelperTest : public testing::Test {
}) != collection.end();
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
};

@ -22,7 +22,7 @@ class CannedBrowsingDataCacheStorageHelperTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
};

@ -216,7 +216,7 @@ class BrowsingDataCookieHelperTest : public testing::Test {
}
protected:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> testing_profile_;
std::vector<CookieExpectation> cookie_expectations_;

@ -14,7 +14,7 @@ namespace {
using storage::DatabaseIdentifier;
class CannedBrowsingDataDatabaseHelperTest : public testing::Test {
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
};
TEST_F(CannedBrowsingDataDatabaseHelperTest, Empty) {

@ -190,7 +190,7 @@ class BrowsingDataFileSystemHelperTest : public testing::Test {
}
protected:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> profile_;
// Temporary storage to pass information back from callbacks.

@ -22,7 +22,7 @@ class CannedBrowsingDataIndexedDBHelperTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
};

@ -12,7 +12,7 @@
namespace {
class CannedBrowsingDataLocalStorageTest : public testing::Test {
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
};
TEST_F(CannedBrowsingDataLocalStorageTest, Empty) {

@ -263,7 +263,7 @@ class BrowsingDataMediaLicenseHelperTest : public testing::Test {
done_cb.Run();
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> profile_;
scoped_refptr<BrowsingDataMediaLicenseHelper> helper_;

@ -111,7 +111,7 @@ class BrowsingDataQuotaHelperTest : public testing::Test {
fetching_completed_ = true;
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
scoped_refptr<storage::QuotaManager> quota_manager_;
base::ScopedTempDir dir_;

@ -24,7 +24,7 @@ class CannedBrowsingDataServiceWorkerHelperTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
};

@ -19,7 +19,7 @@ class CannedBrowsingDataSharedWorkerHelperTest : public testing::Test {
Profile* profile() { return &profile_; }
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
};

@ -1125,7 +1125,7 @@ class ChromeBrowsingDataRemoverDelegateTest : public testing::Test {
// Make sure the Network Service is started before making a NetworkContext.
content::GetNetworkService();
thread_bundle_.RunUntilIdle();
task_environment_.RunUntilIdle();
auto network_context = std::make_unique<network::NetworkContext>(
network::NetworkService::GetNetworkServiceForTesting(),
@ -1231,7 +1231,7 @@ class ChromeBrowsingDataRemoverDelegateTest : public testing::Test {
// Cached pointer to BrowsingDataRemover for access to testing methods.
content::BrowsingDataRemover* remover_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
network::mojom::NetworkContextPtr network_context_ptr_;
network::NetworkContext* network_context_;
std::unique_ptr<TestingProfile> profile_;

@ -395,7 +395,7 @@ class CookiesTreeModelTest : public testing::Test {
#endif
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> profile_;
scoped_refptr<MockBrowsingDataCookieHelper>
mock_browsing_data_cookie_helper_;

@ -57,7 +57,7 @@ class BookmarkCounterTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
std::unique_ptr<base::RunLoop> run_loop_;

@ -36,7 +36,7 @@ class BrowsingDataCounterUtilsTest : public testing::Test {
TestingProfile* GetProfile() { return &profile_; }
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
};

@ -139,7 +139,7 @@ class HostedAppsCounterTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> profile_;
extensions::ExtensionRegistry* extension_registry_;

@ -103,7 +103,7 @@ class SiteDataCountingHelperTest : public testing::Test {
Profile* profile() { return profile_.get(); }
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> profile_;
};

@ -85,7 +85,7 @@ class SiteSettingsCounterTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> profile_;
scoped_refptr<HostContentSettingsMap> map_;

@ -94,7 +94,7 @@ class SiteDataSizeCollectorTest : public testing::Test {
protected:
int64_t fetched_size_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> profile_;
scoped_refptr<MockBrowsingDataCookieHelper>
mock_browsing_data_cookie_helper_;

@ -280,7 +280,7 @@ class CaptivePortalServiceTest : public testing::Test,
// after the test.
const CaptivePortalService::TestingState old_captive_portal_testing_state_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
// Note that the construction order of these matters.
std::unique_ptr<TestingProfile> profile_;

@ -100,7 +100,7 @@ class CertificateManagerModelTest : public testing::Test {
run_loop.Run();
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
crypto::ScopedTestNSSDB test_nssdb_;
std::unique_ptr<net::NSSCertDatabase> nss_cert_db_;
std::unique_ptr<FakeObserver> fake_observer_;

@ -277,7 +277,7 @@ class BlinkSettingsFieldTrialTest : public testing::Test {
base::FieldTrialList trial_list_;
base::CommandLine command_line_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
};
const char BlinkSettingsFieldTrialTest::kDisallowFetchFieldTrialName[] =

@ -144,7 +144,7 @@ class AndroidSmsAppManagerImplTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
std::unique_ptr<sync_preferences::TestingPrefServiceSyncable>

@ -184,7 +184,8 @@ class AndroidSmsAppSetupControllerImplTest : public testing::Test {
};
AndroidSmsAppSetupControllerImplTest()
: thread_bundle_(content::TestBrowserThreadBundle::TimeSource::MOCK_TIME),
: task_environment_(
content::BrowserTaskEnvironment::TimeSource::MOCK_TIME),
host_content_settings_map_(
HostContentSettingsMapFactory::GetForProfile(&profile_)) {}
@ -254,7 +255,7 @@ class AndroidSmsAppSetupControllerImplTest : public testing::Test {
install_requests.size());
EXPECT_EQ(GetInstallOptionsForUrl(install_url), install_requests.back());
thread_bundle_.FastForwardBy(
task_environment_.FastForwardBy(
AndroidSmsAppSetupControllerImpl::kInstallRetryDelay *
(1 << retry_count));
}
@ -262,7 +263,7 @@ class AndroidSmsAppSetupControllerImplTest : public testing::Test {
// Send success code for last attempt.
test_pending_app_manager_->SetInstallResultCode(
web_app::InstallResultCode::kSuccess);
thread_bundle_.FastForwardBy(
task_environment_.FastForwardBy(
AndroidSmsAppSetupControllerImpl::kInstallRetryDelay *
(1 << (num_failure_tries - 1)));
@ -423,7 +424,7 @@ class AndroidSmsAppSetupControllerImplTest : public testing::Test {
std::move(quit_closure).Run();
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
base::Optional<bool> last_set_up_app_result_;
base::Optional<bool> last_delete_cookie_result_;

@ -173,7 +173,7 @@ class ConnectionManagerTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
std::unique_ptr<content::FakeServiceWorkerContext>

@ -24,7 +24,7 @@ namespace android_sms {
class FcmConnectionEstablisherTest : public testing::Test {
protected:
FcmConnectionEstablisherTest()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
: task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
~FcmConnectionEstablisherTest() override = default;
void VerifyTransferrableMessage(
@ -39,7 +39,7 @@ class FcmConnectionEstablisherTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
DISALLOW_COPY_AND_ASSIGN(FcmConnectionEstablisherTest);
};

@ -22,11 +22,11 @@ namespace android_sms {
class StreamingConnectionEstablisherTest : public testing::Test {
protected:
StreamingConnectionEstablisherTest()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
: task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
~StreamingConnectionEstablisherTest() override = default;
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
DISALLOW_COPY_AND_ASSIGN(StreamingConnectionEstablisherTest);
};

@ -53,7 +53,7 @@ class ArcAppShortcutsMenuBuilderTest : public testing::Test {
std::unique_ptr<TestingProfile> profile_;
ArcAppTest arc_app_test_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
DISALLOW_COPY_AND_ASSIGN(ArcAppShortcutsMenuBuilderTest);
};

@ -41,7 +41,7 @@ class ArcAppShortcutsRequestTest : public testing::Test {
std::unique_ptr<TestingProfile> profile_;
ArcAppTest arc_app_test_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
DISALLOW_COPY_AND_ASSIGN(ArcAppShortcutsRequestTest);
};

@ -20,7 +20,7 @@ using ::testing::HasSubstr;
using ::testing::Not;
TEST_F(ArcMigrationGuideNotificationTest, BatteryPercent) {
content::TestBrowserThreadBundle browser_thread_bundle;
content::BrowserTaskEnvironment task_environment;
TestingProfile profile;
// Set a high battery state.

@ -120,7 +120,7 @@ class ArcPlayStoreEnabledPreferenceHandlerTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
user_manager::ScopedUserManager user_manager_enabler_;
base::ScopedTempDir temp_dir_;
std::unique_ptr<IdentityTestEnvironmentProfileAdaptor>

@ -128,7 +128,7 @@ class ArcSessionManagerInLoginScreenTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<ArcServiceManager> arc_service_manager_;
std::unique_ptr<ArcSessionManager> arc_session_manager_;
user_manager::ScopedUserManager user_manager_enabler_;
@ -164,7 +164,7 @@ TEST_F(ArcSessionManagerInLoginScreenTest, EmitLoginPromptVisible_NoOp) {
class ArcSessionManagerTestBase : public testing::Test {
public:
ArcSessionManagerTestBase()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
: task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
user_manager_enabler_(
std::make_unique<chromeos::FakeChromeUserManager>()) {}
~ArcSessionManagerTestBase() override = default;
@ -239,7 +239,7 @@ class ArcSessionManagerTestBase : public testing::Test {
std::make_unique<syncer::SyncErrorFactoryMock>());
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfile> profile_;
std::unique_ptr<ArcServiceManager> arc_service_manager_;
std::unique_ptr<ArcSessionManager> arc_session_manager_;

@ -204,7 +204,7 @@ class ChromeArcUtilTest : public testing::Test {
private:
std::unique_ptr<base::test::ScopedCommandLine> command_line_;
base::test::ScopedFeatureList feature_list_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
base::ScopedTempDir data_dir_;
std::unique_ptr<TestingProfileManager> profile_manager_;

@ -96,7 +96,7 @@ class ArcBootPhaseMonitorBridgeTest : public testing::Test {
user_manager::UserManager::Get());
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
user_manager::ScopedUserManager scoped_user_manager_;
std::unique_ptr<ArcServiceManager> arc_service_manager_;
std::unique_ptr<ArcSessionManager> arc_session_manager_;

@ -90,7 +90,7 @@ class ArcInstanceThrottleTest : public testing::Test {
ArcInstanceThrottleTest* test_;
DISALLOW_COPY_AND_ASSIGN(TestDelegateImpl);
};
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<ArcServiceManager> arc_service_manager_;
std::unique_ptr<ArcSessionManager> arc_session_manager_;
std::unique_ptr<TestingProfile> testing_profile_;

@ -129,7 +129,7 @@ class ArcCertInstallerTest : public testing::Test {
MockRemoteCommandsQueueObserver* observer() { return &observer_; }
private:
content::TestBrowserThreadBundle browser_thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
// ArcServiceManager needs to be created before ArcPolicyBridge (since the
// Bridge depends on the Manager), and it needs to be destroyed after Profile

@ -86,7 +86,7 @@ class ArcSupportMessageHostTest : public testing::Test {
private:
// Fake as if the current testing thread is UI thread.
content::TestBrowserThreadBundle bundle_;
content::BrowserTaskEnvironment bundle_;
std::unique_ptr<TestClient> client_;
std::unique_ptr<extensions::NativeMessageHost> message_host_;

@ -83,7 +83,7 @@ class ArcContentFileSystemAsyncFileUtilTest : public testing::Test {
storage::kFileSystemTypeArcContent, path);
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
FakeFileSystemInstance fake_file_system_;
// Use the same initialization/destruction order as

@ -96,7 +96,7 @@ class ArcContentFileSystemFileStreamReaderTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
FakeFileSystemInstance fake_file_system_;
// Use the same initialization/destruction order as

@ -103,7 +103,7 @@ class ArcContentFileSystemFileStreamWriterTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
FakeFileSystemInstance fake_file_system_;
// Use the same initialization/destruction order as

@ -198,7 +198,7 @@ class ArcDocumentsProviderRootTest : public testing::Test {
}
protected:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
FakeFileSystemInstance fake_file_system_;
// Use the same initialization/destruction order as

@ -83,7 +83,7 @@ class ArcFileSystemBridgeTest : public testing::Test {
protected:
base::ScopedTempDir temp_dir_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
content::TestServiceManagerContext service_manager_context_;
std::unique_ptr<TestingProfileManager> profile_manager_;

@ -127,7 +127,7 @@ class ArcFileSystemOperationRunnerTest : public testing::Test {
counter));
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
FakeFileSystemInstance file_system_instance_;
// Use the same initialization/destruction order as

@ -160,7 +160,7 @@ class ArcSelectFilesHandlerTest : public testing::Test {
callback.Get());
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfileManager> profile_manager_;
std::unique_ptr<ArcSelectFilesHandler> arc_select_files_handler_;
MockSelectFileDialogHolder* mock_dialog_holder_;

@ -66,7 +66,7 @@ class FileStreamForwarderTest : public testing::Test {
}
protected:
content::TestBrowserThreadBundle test_browser_thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
base::ScopedTempDir temp_dir_;
base::FilePath dest_file_path_;
base::ScopedFD dest_fd_;

@ -28,7 +28,7 @@ class IconDecodeRequest : public ImageDecoder::ImageRequest {
// Icons are decoded at a separate process created by ImageDecoder. In unit
// tests these tasks may not finish before the test exits, which causes a
// failure in the base::MessageLoopCurrent::Get()->IsIdleForTesting() check
// in test_browser_thread_bundle.cc.
// in content::~BrowserTaskEnvironment().
static void DisableSafeDecodingForTesting();
// Starts image decoding. Safe asynchronous decoding is used unless

@ -250,7 +250,7 @@ class ArcInputMethodManagerServiceTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<ArcServiceManager> arc_service_manager_;
std::unique_ptr<TestingProfile> profile_;

@ -166,7 +166,7 @@ TEST(OpenWithMenuTest, TestBuildHandlersMap) {
}
TEST(OpenWithMenuTest, TestModelChanged) {
content::TestBrowserThreadBundle thread_bundle;
content::BrowserTaskEnvironment task_environment;
MockRenderViewContextMenu mock_menu(false);
OpenWithMenu observer(nullptr, &mock_menu);
mock_menu.SetObserver(&observer);

@ -54,7 +54,7 @@ class ArcSupervisionTransitionNotificationTest
std::unique_ptr<NotificationDisplayServiceTester> display_service_;
ArcAppTest arc_app_test_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
DISALLOW_COPY_AND_ASSIGN(ArcSupervisionTransitionNotificationTest);
};

@ -47,7 +47,7 @@ class ArcPipBridgeTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile testing_profile_;
std::unique_ptr<ArcBridgeService> arc_bridge_service_;
std::unique_ptr<ArcPipBridge> bridge_;

@ -220,7 +220,7 @@ class ArcPolicyBridgeTestBase {
TestingProfile* profile() { return profile_; }
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
data_decoder::TestingJsonParser::ScopedFactoryOverride factory_override_;
content::TestServiceManagerContext service_manager_context_;
std::unique_ptr<user_manager::ScopedUserManager> user_manager_enabler_;

@ -94,7 +94,7 @@ class ArcTtsServiceTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<ArcServiceManager> arc_service_manager_;
std::unique_ptr<TestingProfile> testing_profile_;
std::unique_ptr<TestableTtsController> tts_controller_;

@ -61,7 +61,7 @@ class FailureDecodeRequestSender
class ArcWallpaperServiceTest : public testing::Test {
public:
ArcWallpaperServiceTest()
: thread_bundle_(std::make_unique<content::TestBrowserThreadBundle>()),
: task_environment_(std::make_unique<content::BrowserTaskEnvironment>()),
user_manager_(new chromeos::FakeChromeUserManager()),
user_manager_enabler_(base::WrapUnique(user_manager_)) {}
~ArcWallpaperServiceTest() override = default;
@ -119,7 +119,7 @@ class ArcWallpaperServiceTest : public testing::Test {
TestWallpaperController test_wallpaper_controller_;
private:
std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
std::unique_ptr<content::BrowserTaskEnvironment> task_environment_;
chromeos::FakeChromeUserManager* const user_manager_ = nullptr;
user_manager::ScopedUserManager user_manager_enabler_;
arc::ArcServiceManager arc_service_manager_;

@ -185,7 +185,7 @@ class ChromeAssistantUtilTest : public testing::Test {
private:
std::unique_ptr<base::test::ScopedCommandLine> command_line_;
base::test::ScopedFeatureList feature_list_;
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
base::ScopedTempDir data_dir_;
std::unique_ptr<IdentityTestEnvironmentProfileAdaptor>
identity_test_env_adaptor_;

@ -82,7 +82,7 @@ class AttestationCAClientTest : public ::testing::Test {
base::RunLoop().RunUntilIdle();
}
content::TestBrowserThreadBundle test_browser_thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
network::TestURLLoaderFactory test_url_loader_factory_;
scoped_refptr<network::SharedURLLoaderFactory>

@ -38,7 +38,7 @@ class AttestationPolicyObserverTest : public ::testing::Test {
base::RunLoop().RunUntilIdle();
}
content::TestBrowserThreadBundle test_browser_thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
ScopedCrosSettingsTestHelper settings_helper_;
StrictMock<MockMachineCertificateUploader> certificate_uploader_;
};

@ -98,7 +98,7 @@ class EnrollmentCertificateUploaderTest : public ::testing::Test {
base::RunLoop().RunUntilIdle();
}
content::TestBrowserThreadBundle test_browser_thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
ScopedCrosSettingsTestHelper settings_helper_;
FakeCryptohomeClient cryptohome_client_;
StrictMock<MockAttestationFlow> attestation_flow_;

@ -136,7 +136,7 @@ class MachineCertificateUploaderTest : public ::testing::TestWithParam<bool> {
return serialized;
}
content::TestBrowserThreadBundle test_browser_thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
ScopedCrosSettingsTestHelper settings_helper_;
FakeCryptohomeClient cryptohome_client_;
StrictMock<MockAttestationFlow> attestation_flow_;

@ -180,7 +180,7 @@ class PlatformVerificationFlowTest : public ::testing::Test {
}
protected:
content::TestBrowserThreadBundle test_browser_thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
StrictMock<MockAttestationFlow> mock_attestation_flow_;
cryptohome::MockAsyncMethodCaller mock_async_caller_;
chromeos::FakeCryptohomeClient fake_cryptohome_client_;

@ -127,7 +127,7 @@ class AuthPolicyCredentialsManagerTest : public testing::Test {
testing::Mock::VerifyAndClearExpectations(mock_user_manager());
}
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
AccountId account_id_;
std::unique_ptr<TestingProfile> profile_;

@ -79,7 +79,7 @@ class FileFlusherTest : public testing::Test {
}
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
base::ScopedTempDir temp_dir_;
std::map<base::FilePath, int> flush_counts_;

@ -138,7 +138,7 @@ class EventBasedStatusReportingServiceTest : public testing::Test {
void SetConnectionType(network::mojom::ConnectionType type) {
network::TestNetworkConnectionTracker::GetInstance()->SetConnectionType(
type);
thread_bundle_.RunUntilIdle();
task_environment_.RunUntilIdle();
}
arc::mojom::AppHost* app_host() { return arc_test_.arc_app_list_prefs(); }
@ -169,7 +169,7 @@ class EventBasedStatusReportingServiceTest : public testing::Test {
base::HistogramTester histogram_tester_;
private:
content::TestBrowserThreadBundle thread_bundle_;
content::BrowserTaskEnvironment task_environment_;
ArcAppTest arc_test_;
std::unique_ptr<TestingProfile> profile_;
TestingConsumerStatusReportingService*

@ -53,7 +53,7 @@ class TimeLimitNotifierTest : public testing::Test {
}
scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
content::TestBrowserThreadBundle bundle_;
content::BrowserTaskEnvironment bundle_;
TestingProfile profile_;
NotificationDisplayServiceTester notification_tester_;
TimeLimitNotifier notifier_;

Some files were not shown because too many files have changed in this diff Show More