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

Unified Diff: ui/views/test/views_test_base.h

Issue 2867663007: Use ScopedTaskEnvironment instead of MessageLoopForUI in ViewsTestBase. (Closed)
Patch Set: self-review Created 3 years, 7 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/views/controls/webview/webview_unittest.cc ('k') | ui/views/test/views_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/views_test_base.h
diff --git a/ui/views/test/views_test_base.h b/ui/views/test/views_test_base.h
index 96763d04f40da0bedb45ebfa6d66238102d18d25..af9760e2c681f08c0d6c8a891fd2519be58ee877 100644
--- a/ui/views/test/views_test_base.h
+++ b/ui/views/test/views_test_base.h
@@ -8,7 +8,7 @@
#include <memory>
#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
+#include "base/test/scoped_task_environment.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -58,14 +58,12 @@ class ViewsTestBase : public PlatformTest {
views_delegate_for_setup_.swap(views_delegate);
}
- base::MessageLoopForUI* message_loop() { return &message_loop_; }
-
// Returns a context view. In aura builds, this will be the
// RootWindow. Everywhere else, NULL.
gfx::NativeWindow GetContext();
private:
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
std::unique_ptr<TestViewsDelegate> views_delegate_for_setup_;
std::unique_ptr<ScopedViewsTestHelper> test_helper_;
bool setup_called_;
« no previous file with comments | « ui/views/controls/webview/webview_unittest.cc ('k') | ui/views/test/views_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698