Commit f893a28a authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[BrowserTaskEnvironment] Rename variables with uncommon names too

As discussed @
https://chromium-review.googlesource.com/c/chromium/src/+/1758440/8#message-f222f67d1440dc03932cb7b666ad65dde5a22b33

Used the following regex to identify files with such variables:
(Browser|Web)TaskEnvironment ([^t]|t[^a]|ta[^s]|tas[^k])\w*;

And then replaced remaining \w*(threads_|bundle_)\w* in the affected
files.

TBR=dcheng@chromium.org

Bug: 992483
Change-Id: Ie363916c3b362d3b1b797db97000b51bceb148aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762330
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689148}
parent e9286935
......@@ -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::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<ukm::TestAutoSetUkmRecorder> recorder_;
BackgroundFetchDelegateImpl* delegate_;
......
......@@ -86,7 +86,7 @@ class ArcSupportMessageHostTest : public testing::Test {
private:
// Fake as if the current testing thread is UI thread.
content::BrowserTaskEnvironment bundle_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestClient> client_;
std::unique_ptr<extensions::NativeMessageHost> message_host_;
......
......@@ -53,7 +53,7 @@ class TimeLimitNotifierTest : public testing::Test {
}
scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
content::BrowserTaskEnvironment bundle_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
NotificationDisplayServiceTester notification_tester_;
TimeLimitNotifier notifier_;
......
......@@ -173,7 +173,7 @@ class FileTasksNotifierTest : public testing::Test {
const base::FilePath& my_files() { return my_files_; }
private:
content::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
FakeDriveFs fake_drivefs_;
mojo::Binding<drivefs::mojom::DriveFs> drivefs_binding_;
std::unique_ptr<TestingProfile> profile_;
......
......@@ -38,7 +38,7 @@ constexpr char kFileSystemId[] = "test-filesystem";
TEST(FileManagerFileAPIUtilTest,
ConvertSelectedFileInfoListToFileChooserFileInfoList) {
// Prepare the test environment.
content::BrowserTaskEnvironment threads;
content::BrowserTaskEnvironment task_environment_;
content::TestServiceManagerContext service_manager_context;
TestingProfileManager profile_manager(TestingBrowserProcess::GetGlobal());
ASSERT_TRUE(profile_manager.SetUp());
......
......@@ -440,7 +440,7 @@ class LockScreenAppManagerImplTest
void OnNoteTakingChanged() { ++note_taking_changed_count_; }
std::unique_ptr<base::test::ScopedCommandLine> command_line_;
content::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
chromeos::ScopedTestUserManager user_manager_;
......
......@@ -348,7 +348,7 @@ class LockScreenProfileCreatorImplTest : public testing::Test {
base::ScopedTempDir user_data_dir_;
ScopedTestingLocalState local_state_;
content::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
chromeos::ScopedTestUserManager test_user_manager_;
......
......@@ -68,7 +68,7 @@ class NetworkScreenUnitTest : public testing::Test {
}
// Test versions of core browser infrastructure.
content::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
// More accessory objects needed by NetworkScreen.
MockNetworkScreenView mock_view_;
......
......@@ -117,7 +117,7 @@ class UpdateScreenUnitTest : public testing::Test {
}
// Test versions of core browser infrastructure.
content::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
ScopedTestingLocalState local_state_;
DISALLOW_COPY_AND_ASSIGN(UpdateScreenUnitTest);
......
......@@ -205,7 +205,7 @@ class MultiProfileUserControllerTest
TestingProfile* profile(int index) { return user_profiles_[index]; }
content::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestingProfileManager> profile_manager_;
FakeChromeUserManager* fake_user_manager_; // Not owned
user_manager::ScopedUserManager user_manager_enabler_;
......
......@@ -334,7 +334,7 @@ class AutoEnrollmentClientImplTest
return static_cast<AutoEnrollmentClientImpl*>(client_.release());
}
content::BrowserTaskEnvironment browser_threads_;
content::BrowserTaskEnvironment task_environment_;
ScopedTestingLocalState scoped_testing_local_state_;
TestingPrefServiceSimple* local_state_;
std::unique_ptr<MockDeviceManagementService> service_;
......
......@@ -201,7 +201,7 @@ class SwReporterInstallerTest : public ::testing::Test {
// |ComponentReady| asserts that it is run on the UI thread, so we must
// create test threads before calling it.
content::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
// Bound callback to the |SwReporterComponentReady| method.
OnComponentReadyCallback on_component_ready_callback_;
......@@ -742,7 +742,7 @@ class SwReporterOnDemandFetcherTest : public ::testing::Test,
bool component_can_be_updated_ = false;
bool error_callback_called_ = false;
content::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
DISALLOW_COPY_AND_ASSIGN(SwReporterOnDemandFetcherTest);
};
......
......@@ -64,7 +64,7 @@ class ContentIndexProviderImplTest : public testing::Test,
}
protected:
content::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
std::unique_ptr<ContentIndexProviderImpl> provider_;
};
......
......@@ -37,7 +37,7 @@ TEST(DownloadPrefsTest, Prerequisites) {
TEST(DownloadPrefsTest, NoAutoOpenForDisallowedFileTypes) {
const base::FilePath kDangerousFilePath(FILE_PATH_LITERAL("/b/very-bad.swf"));
content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile;
DownloadPrefs prefs(&profile);
......@@ -48,7 +48,7 @@ TEST(DownloadPrefsTest, NoAutoOpenForDisallowedFileTypes) {
TEST(DownloadPrefsTest, NoAutoOpenForFilesWithNoExtension) {
const base::FilePath kFileWithNoExtension(FILE_PATH_LITERAL("abcd"));
content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile;
DownloadPrefs prefs(&profile);
......@@ -62,7 +62,7 @@ TEST(DownloadPrefsTest, AutoOpenForSafeFiles) {
const base::FilePath kAnotherSafeFilePath(
FILE_PATH_LITERAL("/ok/not-bad.txt"));
content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile;
DownloadPrefs prefs(&profile);
......@@ -76,7 +76,7 @@ TEST(DownloadPrefsTest, AutoOpenPrefSkipsDangerousFileTypesInPrefs) {
const base::FilePath kSafeFilePath(
FILE_PATH_LITERAL("/good/nothing-wrong.txt"));
content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile;
// This sets .swf files and .txt files as auto-open file types.
profile.GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen, "swf:txt");
......@@ -87,7 +87,7 @@ TEST(DownloadPrefsTest, AutoOpenPrefSkipsDangerousFileTypesInPrefs) {
}
TEST(DownloadPrefsTest, PrefsInitializationSkipsInvalidFileTypes) {
content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile;
profile.GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen,
"swf:txt::.foo:baz");
......@@ -112,7 +112,7 @@ TEST(DownloadPrefsTest, PrefsInitializationSkipsInvalidFileTypes) {
}
TEST(DownloadPrefsTest, AutoOpenCheckIsCaseInsensitive) {
content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile;
profile.GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen,
"txt:Foo:BAR");
......@@ -129,7 +129,7 @@ TEST(DownloadPrefsTest, AutoOpenCheckIsCaseInsensitive) {
}
TEST(DownloadPrefsTest, MissingDefaultPathCorrected) {
content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile;
profile.GetPrefs()->SetFilePath(prefs::kDownloadDefaultDirectory,
base::FilePath());
......@@ -143,7 +143,7 @@ TEST(DownloadPrefsTest, MissingDefaultPathCorrected) {
}
TEST(DownloadPrefsTest, RelativeDefaultPathCorrected) {
content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile;
profile.GetPrefs()->SetFilePath(prefs::kDownloadDefaultDirectory,
......@@ -158,7 +158,7 @@ TEST(DownloadPrefsTest, RelativeDefaultPathCorrected) {
}
TEST(DownloadPrefsTest, DefaultPathChangedToInvalidValue) {
content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile;
profile.GetPrefs()->SetFilePath(prefs::kDownloadDefaultDirectory,
profile.GetPath());
......@@ -185,7 +185,7 @@ void ExpectValidDownloadDir(Profile* profile,
}
TEST(DownloadPrefsTest, DownloadDirSanitization) {
content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
content::BrowserTaskEnvironment task_environment_;
content::TestServiceManagerContext service_manager_context;
TestingProfile profile(base::FilePath("/home/chronos/u-0123456789abcdef"));
DownloadPrefs prefs(&profile);
......
......@@ -98,7 +98,7 @@ struct UnzipFileFilterTestCase {
class ZipFileInstallerTest : public testing::Test {
public:
ZipFileInstallerTest()
: browser_threads_(content::BrowserTaskEnvironment::IO_MAINLOOP),
: task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
data_decoder_(test_connector_factory_.RegisterInstance(
data_decoder::mojom::kServiceName)),
connector_(test_connector_factory_.CreateConnector()) {
......@@ -168,7 +168,7 @@ class ZipFileInstallerTest : public testing::Test {
std::unique_ptr<TestingProfile> profile_;
ExtensionService* extension_service_;
content::BrowserTaskEnvironment browser_threads_;
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<content::InProcessUtilityThreadHelper>
in_process_utility_thread_helper_;
MockExtensionRegistryObserver observer_;
......
......@@ -97,7 +97,7 @@ class DnsProbeRunnerTest : public testing::Test {
return network_context_.get();
}
BrowserTaskEnvironment bundle_;
BrowserTaskEnvironment task_environment_;
std::unique_ptr<network::mojom::NetworkContext> network_context_;
std::unique_ptr<DnsProbeRunner> runner_;
};
......
......@@ -98,7 +98,7 @@ class DnsProbeServiceTest : public testing::Test {
}
base::SimpleTestTickClock tick_clock_;
BrowserTaskEnvironment bundle_;
BrowserTaskEnvironment task_environment_;
std::unique_ptr<FakeHostResolverNetworkContext> network_context_;
std::unique_ptr<FakeDnsConfigChangeManager> dns_config_change_manager_;
std::unique_ptr<DnsProbeService> service_;
......
......@@ -40,7 +40,7 @@ const char kUnregisteredAppID[] = "app_id unregistered";
class ListChangesTaskTest : public testing::Test {
public:
ListChangesTaskTest()
: browser_threads_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
: task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
~ListChangesTaskTest() override {}
void SetUp() override {
......@@ -199,7 +199,7 @@ class ListChangesTaskTest : public testing::Test {
std::string app_root_folder_id_;
std::string unregistered_app_root_folder_id_;
content::BrowserTaskEnvironment browser_threads_;
content::BrowserTaskEnvironment task_environment_;
base::ScopedTempDir database_dir_;
std::unique_ptr<SyncEngineContext> context_;
......
......@@ -266,7 +266,7 @@ class RegisterAppTaskTest : public testing::Test {
int64_t next_file_id_;
int64_t next_tracker_id_;
content::BrowserTaskEnvironment browser_threads_;
content::BrowserTaskEnvironment task_environment_;
base::ScopedTempDir database_dir_;
std::unique_ptr<SyncEngineContext> context_;
......
......@@ -212,7 +212,7 @@ class SyncEngineInitializerTest : public testing::Test {
}
private:
content::BrowserTaskEnvironment browser_threads_;
content::BrowserTaskEnvironment task_environment_;
base::ScopedTempDir database_dir_;
std::unique_ptr<leveldb::Env> in_memory_env_;
......
......@@ -122,7 +122,7 @@ class SyncEngineTest : public testing::Test,
}
private:
content::BrowserTaskEnvironment browser_threads_;
content::BrowserTaskEnvironment task_environment_;
base::ScopedTempDir profile_dir_;
std::unique_ptr<drive_backend::SyncEngine> sync_engine_;
......
......@@ -157,7 +157,7 @@ class SyncWorkerTest : public testing::Test,
}
private:
content::BrowserTaskEnvironment browser_threads_;
content::BrowserTaskEnvironment task_environment_;
base::ScopedTempDir profile_dir_;
std::unique_ptr<leveldb::Env> in_memory_env_;
......
......@@ -83,7 +83,7 @@ class TaskGroupTest : public testing::Test {
task_group_->AddTask(fake_task_.get());
}
content::BrowserTaskEnvironment browser_threads_;
content::BrowserTaskEnvironment task_environment_;
scoped_refptr<base::SequencedTaskRunner> io_task_runner_;
std::unique_ptr<base::RunLoop> run_loop_;
std::unique_ptr<TaskGroup> task_group_;
......
......@@ -185,7 +185,7 @@ class SessionControllerClientImplTest : public testing::Test {
return profile;
}
content::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
content::TestServiceManagerContext context_;
std::unique_ptr<TestingProfileManager> profile_manager_;
std::unique_ptr<AssistantClient> assistant_client_;
......
......@@ -75,7 +75,7 @@ class ManagedUIHandlerTest : public testing::Test {
}
private:
content::BrowserTaskEnvironment bundle_;
content::BrowserTaskEnvironment task_environment_;
testing::NiceMock<policy::MockConfigurationPolicyProvider> policy_provider_;
std::unique_ptr<TestingProfile> profile_;
......
......@@ -70,7 +70,7 @@ class LRURendererCacheTest : public testing::Test {
lru_cache_->SetFactoryForTesting(&factory_);
}
content::BrowserTaskEnvironment threads_;
content::BrowserTaskEnvironment task_environment_;
content::TestBrowserContext browser_context_;
MockFactory factory_;
std::unique_ptr<LRURendererCache> lru_cache_;
......@@ -92,7 +92,7 @@ TEST_F(LRURendererCacheTest, SimpleTakeAndRelease) {
// Releasing the prelauncher will cache it and prelaunch for later use.
EXPECT_CREATE_AND_PRELAUNCH(p1, kUrl1);
lru_cache_->ReleaseRendererPrelauncher(kUrl1);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
// Cache: [ 1 ]
// In-use: []
......@@ -106,7 +106,7 @@ TEST_F(LRURendererCacheTest, SimpleTakeAndRelease) {
// Return the prelauncher again, it should be cached the same as before.
EXPECT_CREATE_AND_PRELAUNCH(p1, kUrl1);
lru_cache_->ReleaseRendererPrelauncher(kUrl1);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
// Cache: [ 1 ]
// In-use: []
}
......@@ -123,7 +123,7 @@ TEST_F(LRURendererCacheTest, SimpleCacheEviction) {
ASSERT_FALSE(taken);
EXPECT_CREATE_AND_PRELAUNCH(p1, kUrl1);
lru_cache_->ReleaseRendererPrelauncher(kUrl1);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
// Cache: [ 1 ]
// In-use: []
......@@ -153,7 +153,7 @@ TEST_F(LRURendererCacheTest, CapacityOne) {
// Releasing the prelauncher will cache it and prelaunch for later use.
EXPECT_CREATE_AND_PRELAUNCH(p1, kUrl1);
lru_cache_->ReleaseRendererPrelauncher(kUrl1);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
// Cache: [ 1 ]
// In-use: []
......@@ -167,7 +167,7 @@ TEST_F(LRURendererCacheTest, CapacityOne) {
// Return the prelauncher again, it should be cached the same as before.
EXPECT_CREATE_AND_PRELAUNCH(p1, kUrl1);
lru_cache_->ReleaseRendererPrelauncher(kUrl1);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
// Cache: [ 1 ]
// In-use: []
......@@ -183,7 +183,7 @@ TEST_F(LRURendererCacheTest, CapacityOne) {
// Return prelauncher 2, it should be cached.
EXPECT_CREATE_AND_PRELAUNCH(p2, kUrl2);
lru_cache_->ReleaseRendererPrelauncher(kUrl2);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
// Cache: [ 2 ]
// In-use: [ ]
taken = lru_cache_->TakeRendererPrelauncher(kUrl2);
......@@ -195,7 +195,7 @@ TEST_F(LRURendererCacheTest, CapacityOne) {
// Return prelauncher 2 once more, it will be cached.
EXPECT_CREATE_AND_PRELAUNCH(p2, kUrl2);
lru_cache_->ReleaseRendererPrelauncher(kUrl2);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
// Cache: [ 2 ]
// In-use: [ ]
......@@ -218,7 +218,7 @@ TEST_F(LRURendererCacheTest, CapacityOne) {
// since there's still exactly 1 renderer in-use.
EXPECT_CALL(factory_, Create(_, _)).Times(0);
lru_cache_->ReleaseRendererPrelauncher(kUrl2);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
// Cache: [ ]
// In-use: [ 1 ]
}
......@@ -246,16 +246,16 @@ TEST_F(LRURendererCacheTest, CapacityTwo) {
// Don't cache renderer 3 since there are still 2 in use.
EXPECT_CALL(factory_, Create(_, _)).Times(0);
lru_cache_->ReleaseRendererPrelauncher(kUrl3);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
// In-use: [ 1, 2 ]
// Fill the cache with remaining 2 renderers.
EXPECT_CREATE_AND_PRELAUNCH(p2, kUrl2);
lru_cache_->ReleaseRendererPrelauncher(kUrl2);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
EXPECT_CREATE_AND_PRELAUNCH(p1, kUrl1);
lru_cache_->ReleaseRendererPrelauncher(kUrl1);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
// Cache: [ 1, 2 ]
// In-use: [ ]
......@@ -269,7 +269,7 @@ TEST_F(LRURendererCacheTest, CapacityTwo) {
// Return renderer 1.
EXPECT_CREATE_AND_PRELAUNCH(p1, kUrl1);
lru_cache_->ReleaseRendererPrelauncher(kUrl1);
threads_.RunUntilIdle();
task_environment_.RunUntilIdle();
// Cache: [ 1, 2 ]
// In-use: [ ]
......
......@@ -41,7 +41,7 @@ class PrinterCapabilitiesTest : public testing::Test {
TestPrintBackend* print_backend() { return test_backend_.get(); }
private:
content::BrowserTaskEnvironment test_browser_threads_;
content::BrowserTaskEnvironment task_environment_;
scoped_refptr<TestPrintBackend> test_backend_;
};
......
......@@ -165,7 +165,7 @@ class TestClientRunner {
};
TEST_F(BrowserAssociatedInterfaceTest, Basic) {
BrowserTaskEnvironment browser_threads_;
BrowserTaskEnvironment task_environment_;
mojo::MessagePipe pipe;
ProxyRunner proxy(std::move(pipe.handle0), true,
base::CreateSingleThreadTaskRunner({BrowserThread::IO}));
......
......@@ -57,8 +57,8 @@ namespace {
// Convenience macro to block the test procedure until all pending tasks have
// run on the device thread.
#define WAIT_FOR_DEVICE_TASKS() \
browser_threads_.RunIOThreadUntilIdle(); \
#define WAIT_FOR_DEVICE_TASKS() \
task_environment_.RunIOThreadUntilIdle(); \
RUN_UI_TASKS()
// Capture parameters.
......@@ -288,7 +288,7 @@ class FrameSinkVideoCaptureDeviceForTest : public FrameSinkVideoCaptureDevice {
class FrameSinkVideoCaptureDeviceTest : public testing::Test {
public:
FrameSinkVideoCaptureDeviceTest()
: browser_threads_(BrowserTaskEnvironment::REAL_IO_THREAD) {}
: task_environment_(BrowserTaskEnvironment::REAL_IO_THREAD) {}
~FrameSinkVideoCaptureDeviceTest() override { EXPECT_FALSE(device_); }
......@@ -411,7 +411,7 @@ class FrameSinkVideoCaptureDeviceTest : public testing::Test {
protected:
// See the threading notes at top of this file.
BrowserTaskEnvironment browser_threads_;
BrowserTaskEnvironment task_environment_;
NiceMock<MockFrameSinkVideoCapturer> capturer_;
std::unique_ptr<FrameSinkVideoCaptureDevice> device_;
......
......@@ -110,7 +110,7 @@ class QuotaPolicyCookieStoreTest : public testing::Test {
DestroyStore();
}
BrowserTaskEnvironment bundle_;
BrowserTaskEnvironment task_environment_;
const scoped_refptr<base::SequencedTaskRunner> background_task_runner_ =
base::CreateSequencedTaskRunner({base::ThreadPool(), base::MayBlock()});
base::WaitableEvent loaded_event_;
......
......@@ -202,7 +202,7 @@ class VideoCaptureControllerTest
base::TimeDelta(), frame_feedback_id);
}
BrowserTaskEnvironment bundle_;
BrowserTaskEnvironment task_environment_;
scoped_refptr<media::VideoCaptureBufferPool> buffer_pool_;
std::unique_ptr<MockVideoCaptureControllerEventHandler> client_a_;
std::unique_ptr<MockVideoCaptureControllerEventHandler> client_b_;
......
......@@ -56,7 +56,7 @@ void PostTaskToUIThread(int iteration, base::subtle::Atomic32* tasks_run) {
} // namespace
TEST(BrowserTaskEnvironmentTest, RunUntilIdle) {
BrowserTaskEnvironment browser_task_environment;
BrowserTaskEnvironment task_environment;
base::subtle::Atomic32 tasks_run = 0;
......@@ -70,7 +70,7 @@ TEST(BrowserTaskEnvironmentTest, RunUntilIdle) {
}
}
browser_task_environment.RunUntilIdle();
task_environment.RunUntilIdle();
EXPECT_EQ(kNumTasks * kNumHops, base::subtle::NoBarrier_Load(&tasks_run));
}
......@@ -93,7 +93,7 @@ void PostRecurringTaskToIOThread(int iteration, int* tasks_run) {
} // namespace
TEST(BrowserTaskEnvironmentTest, RunIOThreadUntilIdle) {
BrowserTaskEnvironment browser_task_environment(
BrowserTaskEnvironment task_environment(
BrowserTaskEnvironment::Options::REAL_IO_THREAD);
int tasks_run = 0;
......@@ -102,7 +102,7 @@ TEST(BrowserTaskEnvironmentTest, RunIOThreadUntilIdle) {
PostRecurringTaskToIOThread(0, &tasks_run);
}
browser_task_environment.RunIOThreadUntilIdle();
task_environment.RunIOThreadUntilIdle();
EXPECT_EQ(kNumTasks * kNumHops, tasks_run);
}
......@@ -115,7 +115,7 @@ TEST(BrowserTaskEnvironmentTest, MessageLoopTypeMismatch) {
EXPECT_DEATH_IF_SUPPORTED(
{
BrowserTaskEnvironment browser_task_environment(
BrowserTaskEnvironment task_environment(
BrowserTaskEnvironment::IO_MAINLOOP);
},
"");
......@@ -126,14 +126,14 @@ TEST(BrowserTaskEnvironmentTest, MultipleBrowserTaskEnvironment) {
EXPECT_DEATH_IF_SUPPORTED(
{
BrowserTaskEnvironment browser_task_environment;
BrowserTaskEnvironment other_browser_task_environment;
BrowserTaskEnvironment task_environment;
BrowserTaskEnvironment other_task_environment;
},
"");
}
TEST(BrowserTaskEnvironmentTest, TraitsConstructor) {
BrowserTaskEnvironment browser_task_environment(
BrowserTaskEnvironment task_environment(
BrowserTaskEnvironment::Options::REAL_IO_THREAD,
base::test::TaskEnvironment::ThreadPoolExecutionMode::QUEUED);
// Should set up a UI main thread.
......@@ -159,12 +159,12 @@ TEST(BrowserTaskEnvironmentTest, TraitsConstructor) {
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100));
EXPECT_FALSE(task_ran.IsSet());
browser_task_environment.RunUntilIdle();
task_environment.RunUntilIdle();
EXPECT_TRUE(task_ran.IsSet());
}
TEST(BrowserTaskEnvironmentTest, TraitsConstructorOverrideMainThreadType) {
BrowserTaskEnvironment browser_task_environment(
BrowserTaskEnvironment task_environment(
base::test::TaskEnvironment::MainThreadType::UI,
base::test::TaskEnvironment::TimeSource::MOCK_TIME);
......@@ -173,7 +173,7 @@ TEST(BrowserTaskEnvironmentTest, TraitsConstructorOverrideMainThreadType) {
EXPECT_FALSE(base::MessageLoopCurrentForIO::IsSet());
// There should be a mock clock.
EXPECT_THAT(browser_task_environment.GetMockClock(), testing::NotNull());
EXPECT_THAT(task_environment.GetMockClock(), testing::NotNull());
}
} // namespace content
......@@ -20,7 +20,7 @@ constexpr base::FilePath::CharType kFilePath[] = FILE_PATH_LITERAL("some_path");
}
TEST(WebRequestInfoTest, CreateRequestBodyDataFromFile) {
content::BrowserTaskEnvironment test_bundle;
content::BrowserTaskEnvironment task_environment_;
network::ResourceRequest request;
request.method = "POST";
......
......@@ -223,7 +223,7 @@ class CacheCounterTest : public PlatformTest {
run_loop_->Quit();
}
web::WebTaskEnvironment bundle_;
web::WebTaskEnvironment task_environment_;
std::unique_ptr<base::RunLoop> run_loop_;
std::unique_ptr<ios::ChromeBrowserState> browser_state_;
......
......@@ -98,7 +98,7 @@ class WKHTTPSystemCookieStoreTestDelegate {
SystemCookieStore* GetCookieStore() { return store_.get(); }
private:
web::WebTaskEnvironment web_thread_;
web::WebTaskEnvironment task_environment_;
web::TestBrowserState browser_state_;
WKHTTPCookieStore* shared_store_ = nil;
std::unique_ptr<web::WKHTTPSystemCookieStore> store_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment