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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc

Issue 2785883004: Add missing TaskScheduler on tests using RendereWidgetHostImpl (Closed)
Patch Set: yet another mac fix Created 3 years, 9 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: content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc b/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
index 11fa6eaf714e4d536d16b4b9d141aea9e3db42a0..72c361be1b78b8265141debefa8d2f3bb5025f1f 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
@@ -13,6 +13,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
+#include "base/test/scoped_task_scheduler.h"
#include "build/build_config.h"
#include "cc/surfaces/compositor_frame_sink_support.h"
#include "cc/surfaces/surface.h"
@@ -73,7 +74,7 @@ class MockCrossProcessFrameConnector : public CrossProcessFrameConnector {
class RenderWidgetHostViewChildFrameTest : public testing::Test {
public:
- RenderWidgetHostViewChildFrameTest() {}
+ RenderWidgetHostViewChildFrameTest() : task_scheduler_(&message_loop_) {}
void SetUp() override {
browser_context_.reset(new TestBrowserContext);
@@ -125,6 +126,10 @@ class RenderWidgetHostViewChildFrameTest : public testing::Test {
protected:
base::MessageLoopForUI message_loop_;
+
+ // TaskScheduler is used by RenderWidgetHostImpl constructor.
+ base::test::ScopedTaskScheduler task_scheduler_;
+
std::unique_ptr<BrowserContext> browser_context_;
MockRenderWidgetHostDelegate delegate_;

Powered by Google App Engine
This is Rietveld 408576698