Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller_unittest.mm

Issue 2846073002: Use ScopedTaskEnvironment instead of MessageLoopForUI in ios tests. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/ui/settings/translate_collection_view_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller_unittest.mm b/ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller_unittest.mm
index e0326ec0a58e07bdc8910c1a9e89f9203698125e..63ead890d522ac91ae603934c1992d43febc2b94 100644
--- a/ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller_unittest.mm
+++ b/ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller_unittest.mm
@@ -5,7 +5,7 @@
#import "ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller.h"
#include "base/files/file_path.h"
-#include "base/message_loop/message_loop.h"
+#include "base/test/scoped_task_environment.h"
#include "components/browsing_data/core/pref_names.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
@@ -32,6 +32,10 @@ const NSInteger kNumberOfItems = 5;
class TimeRangeSelectorCollectionViewControllerTest
: public CollectionViewControllerTest {
protected:
+ TimeRangeSelectorCollectionViewControllerTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
+
void SetUp() override {
CollectionViewControllerTest::SetUp();
pref_service_ = CreateLocalState();
@@ -64,7 +68,7 @@ class TimeRangeSelectorCollectionViewControllerTest
EXPECT_EQ(accessory_type, cell.accessoryType);
}
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
std::unique_ptr<PrefService> pref_service_;
id delegate_;
TimeRangeSelectorCollectionViewController* time_range_selector_controller_;
« no previous file with comments | « no previous file | ios/chrome/browser/ui/settings/translate_collection_view_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698