Index: components/mus/ws/window_tree_unittest.cc |
diff --git a/components/mus/ws/window_tree_unittest.cc b/components/mus/ws/window_tree_unittest.cc |
index e31150fa027cb09abde91cfb1e7ea07d09c86da6..6135cda84f0c0b8af5f7df6ed79ff6fdcdd76148 100644 |
--- a/components/mus/ws/window_tree_unittest.cc |
+++ b/components/mus/ws/window_tree_unittest.cc |
@@ -417,7 +417,8 @@ class WindowTreeTest : public testing::Test { |
WindowTreeTest() |
: wm_client_(nullptr), |
cursor_id_(0), |
- display_manager_factory_(&cursor_id_) {} |
+ display_manager_factory_(&cursor_id_), |
+ surfaces_state_(new SurfacesState()) {} |
~WindowTreeTest() override {} |
// WindowTreeImpl for the window manager. |
@@ -477,10 +478,10 @@ class WindowTreeTest : public testing::Test { |
DisplayManager::set_factory_for_testing(&display_manager_factory_); |
// TODO(fsamuel): This is probably broken. We need a root. |
connection_manager_.reset( |
- new ConnectionManager(&delegate_, scoped_refptr<SurfacesState>())); |
- window_tree_host_ = new WindowTreeHostImpl( |
- connection_manager_.get(), nullptr, scoped_refptr<GpuState>(), |
- scoped_refptr<mus::SurfacesState>()); |
+ new ConnectionManager(&delegate_, surfaces_state_)); |
+ window_tree_host_ = |
+ new WindowTreeHostImpl(connection_manager_.get(), nullptr, |
+ scoped_refptr<GpuState>(), surfaces_state_); |
// TODO(fsamuel): This is way too magical. We need to find a better way to |
// manage lifetime. |
host_connection_ = new TestWindowTreeHostConnection( |
@@ -497,6 +498,7 @@ class WindowTreeTest : public testing::Test { |
TestConnectionManagerDelegate delegate_; |
TestWindowTreeHostConnection* host_connection_; |
WindowTreeHostImpl* window_tree_host_ = nullptr; |
+ scoped_refptr<SurfacesState> surfaces_state_; |
scoped_ptr<ConnectionManager> connection_manager_; |
base::MessageLoop message_loop_; |