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

Unified Diff: ui/aura/test/aura_test_base.cc

Issue 2849423002: Use ScopedTaskEnvironment instead of MessageLoopForUI in ui/aura/test/. (Closed)
Patch Set: add-deps 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 | « ui/aura/test/aura_test_base.h ('k') | ui/aura/test/aura_test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/aura_test_base.cc
diff --git a/ui/aura/test/aura_test_base.cc b/ui/aura/test/aura_test_base.cc
index 17ce8daf3ff0818f5314625d2fc6242edc346b3e..45f49357bc76b9bb6d54dfce21aca66fd7683725 100644
--- a/ui/aura/test/aura_test_base.cc
+++ b/ui/aura/test/aura_test_base.cc
@@ -4,6 +4,7 @@
#include "ui/aura/test/aura_test_base.h"
+#include "base/memory/ptr_util.h"
#include "ui/aura/client/window_parenting_client.h"
#include "ui/aura/mus/property_utils.h"
#include "ui/aura/mus/window_tree_client.h"
@@ -22,7 +23,10 @@ namespace aura {
namespace test {
AuraTestBase::AuraTestBase()
- : window_manager_delegate_(this), window_tree_client_delegate_(this) {}
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI),
+ window_manager_delegate_(this),
+ window_tree_client_delegate_(this) {}
AuraTestBase::~AuraTestBase() {
CHECK(setup_called_)
@@ -79,7 +83,7 @@ void AuraTestBase::SetUp() {
ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory,
&context_factory_private);
- helper_.reset(new AuraTestHelper(&message_loop_));
+ helper_ = base::MakeUnique<AuraTestHelper>();
if (use_mus_) {
helper_->EnableMusWithTestWindowTree(window_tree_client_delegate_,
window_manager_delegate_);
« no previous file with comments | « ui/aura/test/aura_test_base.h ('k') | ui/aura/test/aura_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698