Index: content/public/test/render_view_test.cc |
diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc |
index 40fcb260b693ae64ee5ebb0aef21ebab95535e3d..a9f53582bd6db3df2f13e3d1671e47a593fbdbe8 100644 |
--- a/content/public/test/render_view_test.cc |
+++ b/content/public/test/render_view_test.cc |
@@ -230,6 +230,12 @@ void RenderViewTest::GoForward(const GURL& url, const PageState& state) { |
} |
void RenderViewTest::SetUp() { |
+ // Initialize mojo firstly to enable Blink initialization to use it. |
+ InitializeMojo(); |
+ test_io_thread_.reset(new base::TestIOThread(base::TestIOThread::kAutoStart)); |
+ ipc_support_.reset( |
+ new mojo::edk::test::ScopedIPCSupport(test_io_thread_->task_runner())); |
+ |
// Blink needs to be initialized before calling CreateContentRendererClient() |
// because it uses blink internally. |
blink::initialize(blink_platform_impl_.Get()); |
@@ -307,11 +313,6 @@ void RenderViewTest::SetUp() { |
view_params.min_size = gfx::Size(); |
view_params.max_size = gfx::Size(); |
- InitializeMojo(); |
- test_io_thread_.reset(new base::TestIOThread(base::TestIOThread::kAutoStart)); |
- ipc_support_.reset( |
- new mojo::edk::test::ScopedIPCSupport(test_io_thread_->task_runner())); |
- |
// This needs to pass the mock render thread to the view. |
RenderViewImpl* view = |
RenderViewImpl::Create(compositor_deps_.get(), view_params, false); |