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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc

Issue 2677153002: Use TaskScheduler instead of blocking pool in render_widget_host_impl.cc. (Closed)
Patch Set: ScopedTaskSchedulers Created 3 years, 10 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
Index: chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc b/chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc
index 68f226d926407fa0c78d90bd9fbaf3da56049653..eec286e983ad27b7183bffbc7e3c1a5048bf1736 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view_unittest.cc
@@ -3,9 +3,11 @@
// found in the LICENSE file.
#include "base/macros.h"
+#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/test/scoped_task_scheduler.h"
#include "chrome/browser/sessions/session_tab_helper.h"
#include "chrome/browser/ui/toolbar/test_toolbar_action_view_controller.h"
#include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
@@ -98,7 +100,8 @@ class ToolbarActionViewUnitTest : public views::ViewsTestBase {
public:
ToolbarActionViewUnitTest()
: widget_(nullptr),
- ui_thread_(content::BrowserThread::UI, message_loop()) {}
+ ui_thread_(content::BrowserThread::UI, message_loop()),
+ scoped_task_scheduler_(base::MessageLoop::current()) {}
~ToolbarActionViewUnitTest() override {}
void SetUp() override {
@@ -122,8 +125,9 @@ class ToolbarActionViewUnitTest : public views::ViewsTestBase {
// The widget managed by this test.
views::Widget* widget_;
- // Web contents need a fake ui thread.
+ // Web contents need a UI thread and a TaskScheduler.
content::TestBrowserThread ui_thread_;
+ base::test::ScopedTaskScheduler scoped_task_scheduler_;
DISALLOW_COPY_AND_ASSIGN(ToolbarActionViewUnitTest);
};

Powered by Google App Engine
This is Rietveld 408576698