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

Unified Diff: ios/web/webui/url_fetcher_block_adapter_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 | « ios/chrome/browser/ui/settings/voicesearch_collection_view_controller_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/webui/url_fetcher_block_adapter_unittest.mm
diff --git a/ios/web/webui/url_fetcher_block_adapter_unittest.mm b/ios/web/webui/url_fetcher_block_adapter_unittest.mm
index 87e287293a529dbdedbfbce4d67af9ed7cb3664d..51e12f4f35d75bc40be50511fd9f119f7f2e76d7 100644
--- a/ios/web/webui/url_fetcher_block_adapter_unittest.mm
+++ b/ios/web/webui/url_fetcher_block_adapter_unittest.mm
@@ -10,6 +10,7 @@
#include "base/files/file_util.h"
#include "base/run_loop.h"
#include "base/strings/sys_string_conversions.h"
+#include "base/test/scoped_task_environment.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_request_status.h"
#include "net/url_request/url_request_test_util.h"
@@ -22,8 +23,12 @@ namespace web {
// Test fixture for URLFetcherBlockAdapter.
class URLFetcherBlockAdapterTest : public PlatformTest {
protected:
+ URLFetcherBlockAdapterTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
+
// Required for base::MessageLoop::current().
- base::MessageLoopForUI loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
};
// Tests that URLFetcherBlockAdapter calls its completion handler with the
« no previous file with comments | « ios/chrome/browser/ui/settings/voicesearch_collection_view_controller_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698