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

Unified Diff: ui/views/controls/webview/webview_unittest.cc

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 | « chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc ('k') | ui/views/test/views_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/webview/webview_unittest.cc
diff --git a/ui/views/controls/webview/webview_unittest.cc b/ui/views/controls/webview/webview_unittest.cc
index 5436b2923203d07ae61a8e8cecffb19575b449d5..1d9b6173bd79f6dc4b7354a44d12d359745b1abb 100644
--- a/ui/views/controls/webview/webview_unittest.cc
+++ b/ui/views/controls/webview/webview_unittest.cc
@@ -10,12 +10,10 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
-#include "base/message_loop/message_loop.h"
-#include "base/test/scoped_task_scheduler.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/test/test_browser_context.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/web_contents_tester.h"
#include "content/test/test_content_browser_client.h"
#include "ui/events/event.h"
@@ -132,13 +130,7 @@ class WebViewTestWebContentsDelegate : public content::WebContentsDelegate {
// Provides functionality to test a WebView.
class WebViewUnitTest : public views::test::WidgetTest {
public:
- WebViewUnitTest()
- : ui_thread_(content::BrowserThread::UI, base::MessageLoop::current()),
- scoped_task_scheduler_(base::MessageLoop::current()),
- file_blocking_thread_(content::BrowserThread::FILE_USER_BLOCKING,
- base::MessageLoop::current()),
- io_thread_(content::BrowserThread::IO, base::MessageLoop::current()),
- top_level_widget_(nullptr) {}
+ WebViewUnitTest() = default;
~WebViewUnitTest() override {}
@@ -185,15 +177,12 @@ class WebViewUnitTest : public views::test::WidgetTest {
}
private:
- content::TestBrowserThread ui_thread_;
- base::test::ScopedTaskScheduler scoped_task_scheduler_;
- content::TestBrowserThread file_blocking_thread_;
- content::TestBrowserThread io_thread_;
+ content::TestBrowserThreadBundle test_browser_thread_bundle_;
std::unique_ptr<content::TestBrowserContext> browser_context_;
content::TestContentBrowserClient test_browser_client_;
- Widget* top_level_widget_;
- WebView* web_view_;
+ Widget* top_level_widget_ = nullptr;
+ WebView* web_view_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(WebViewUnitTest);
};
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc ('k') | ui/views/test/views_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698