| Index: services/ui/ws/window_tree_client_unittest.cc
|
| diff --git a/services/ui/ws/window_tree_client_unittest.cc b/services/ui/ws/window_tree_client_unittest.cc
|
| index dbdbc4bc8872ada670420a9adbdd70b729c95b19..d44e539b98211a50df7eda2f43d8feb0bff53bbd 100644
|
| --- a/services/ui/ws/window_tree_client_unittest.cc
|
| +++ b/services/ui/ws/window_tree_client_unittest.cc
|
| @@ -162,6 +162,8 @@ class TestWindowTreeClient : public mojom::WindowTreeClient,
|
|
|
| uint32_t GetAndAdvanceChangeId() { return next_change_id_++; }
|
|
|
| + mojo::Binding<WindowTreeClient>& binding() { return binding_; }
|
| +
|
| // Runs a nested MessageLoop until OnEmbed() has been encountered.
|
| void WaitForOnEmbed() {
|
| if (tree_)
|
| @@ -660,15 +662,19 @@ class WindowTreeClientTest : public WindowServerServiceTestBase {
|
|
|
| WindowServerServiceTestBase::SetUp();
|
|
|
| - mojom::WindowTreeHostFactoryPtr factory;
|
| - connector()->BindInterface(ui::mojom::kServiceName, &factory);
|
| -
|
| - mojom::WindowTreeClientPtr tree_client_ptr;
|
| wt_client1_ = base::MakeUnique<TestWindowTreeClient>();
|
| - wt_client1_->Bind(MakeRequest(&tree_client_ptr));
|
|
|
| - factory->CreateWindowTreeHost(MakeRequest(&host_),
|
| - std::move(tree_client_ptr));
|
| + ui::mojom::WindowTreeHostFactoryRegistrarPtr host_factory_registrar;
|
| + connector()->BindInterface(ui::mojom::kServiceName,
|
| + &host_factory_registrar);
|
| +
|
| + ui::mojom::WindowTreePtr window_tree;
|
| + ui::mojom::WindowTreeHostFactoryPtr window_tree_host_factory;
|
| + host_factory_registrar->Register(
|
| + MakeRequest(&window_tree_host_factory), MakeRequest(&window_tree),
|
| + wt_client1_->binding().CreateInterfacePtrAndBind());
|
| +
|
| + window_tree_host_factory->CreateWindowTreeHost(MakeRequest(&host_));
|
|
|
| // Next we should get an embed call on the "window manager" client.
|
| wt_client1_->WaitForOnEmbed();
|
|
|