[TaskEnvironment] Mass-migrate away from ScopedTaskEnvironment (1/2)
(well half of them because git cl upload wouldn't let me do
them all at once...)
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.
[email protected]
Bug: 992483
Change-Id: I44bc376deee9b6c95bafac8d54165174d86a5001
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756247
Reviewed-by: Gabriel Charette <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: Gabriel Charette <[email protected]>
Cr-Commit-Position: refs/heads/master@{#688086}
diff --git a/content/common/font_list_unittest.cc b/content/common/font_list_unittest.cc
index 7f626783..4be3da54 100644
--- a/content/common/font_list_unittest.cc
+++ b/content/common/font_list_unittest.cc
@@ -38,7 +38,7 @@
#if !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
// GetFontList is not implemented on Android and Fuchsia.
TEST(FontList, GetFontList) {
- base::test::ScopedTaskEnvironment scoped_task_environment;
+ base::test::TaskEnvironment task_environment;
content::GetFontListTaskRunner()->PostTask(
FROM_HERE, base::BindOnce([] {
@@ -56,7 +56,7 @@
EXPECT_TRUE(HasFontWithName(*fonts, "Arial", "Arial"));
#endif
}));
- scoped_task_environment.RunUntilIdle();
+ task_environment.RunUntilIdle();
}
#endif // !defined(OS_ANDROID) && !defined(OS_FUCHSIA)