| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include <stddef.h> | 5 #include <stddef.h> | 
| 6 #include <stdint.h> | 6 #include <stdint.h> | 
| 7 | 7 | 
| 8 #include "base/bind.h" | 8 #include "base/bind.h" | 
| 9 #include "base/macros.h" | 9 #include "base/macros.h" | 
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" | 
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" | 
| 12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" | 
| 13 #include "mojo/public/cpp/bindings/associated_binding.h" | 13 #include "mojo/public/cpp/bindings/associated_binding.h" | 
| 14 #include "mojo/public/cpp/bindings/binding.h" | 14 #include "mojo/public/cpp/bindings/binding.h" | 
| 15 #include "services/service_manager/public/cpp/interface_factory.h" | 15 #include "services/service_manager/public/cpp/interface_factory.h" | 
| 16 #include "services/service_manager/public/cpp/interface_registry.h" | 16 #include "services/service_manager/public/cpp/interface_registry.h" | 
| 17 #include "services/service_manager/public/cpp/service_test.h" | 17 #include "services/service_manager/public/cpp/service_test.h" | 
| 18 #include "services/ui/public/cpp/tests/window_server_shelltest_base.h" | 18 #include "services/ui/public/cpp/tests/window_server_shelltest_base.h" | 
|  | 19 #include "services/ui/public/interfaces/constants.mojom.h" | 
| 19 #include "services/ui/public/interfaces/window_tree.mojom.h" | 20 #include "services/ui/public/interfaces/window_tree.mojom.h" | 
| 20 #include "services/ui/public/interfaces/window_tree_host.mojom.h" | 21 #include "services/ui/public/interfaces/window_tree_host.mojom.h" | 
| 21 #include "services/ui/ws/ids.h" | 22 #include "services/ui/ws/ids.h" | 
| 22 #include "services/ui/ws/test_change_tracker.h" | 23 #include "services/ui/ws/test_change_tracker.h" | 
| 23 | 24 | 
| 24 using mojo::Array; | 25 using mojo::Array; | 
| 25 using service_manager::Connection; | 26 using service_manager::Connection; | 
| 26 using mojo::InterfaceRequest; | 27 using mojo::InterfaceRequest; | 
| 27 using service_manager::Service; | 28 using service_manager::Service; | 
| 28 using mojo::String; | 29 using mojo::String; | 
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 643     registry->AddInterface(client_factory_.get()); | 644     registry->AddInterface(client_factory_.get()); | 
| 644     return true; | 645     return true; | 
| 645   } | 646   } | 
| 646 | 647 | 
| 647   void SetUp() override { | 648   void SetUp() override { | 
| 648     client_factory_ = base::MakeUnique<WindowTreeClientFactory>(); | 649     client_factory_ = base::MakeUnique<WindowTreeClientFactory>(); | 
| 649 | 650 | 
| 650     WindowServerServiceTestBase::SetUp(); | 651     WindowServerServiceTestBase::SetUp(); | 
| 651 | 652 | 
| 652     mojom::WindowTreeHostFactoryPtr factory; | 653     mojom::WindowTreeHostFactoryPtr factory; | 
| 653     connector()->ConnectToInterface("ui", &factory); | 654     connector()->ConnectToInterface(ui::mojom::kServiceName, &factory); | 
| 654 | 655 | 
| 655     mojom::WindowTreeClientPtr tree_client_ptr; | 656     mojom::WindowTreeClientPtr tree_client_ptr; | 
| 656     wt_client1_ = base::MakeUnique<TestWindowTreeClient>(); | 657     wt_client1_ = base::MakeUnique<TestWindowTreeClient>(); | 
| 657     wt_client1_->Bind(GetProxy(&tree_client_ptr)); | 658     wt_client1_->Bind(GetProxy(&tree_client_ptr)); | 
| 658 | 659 | 
| 659     factory->CreateWindowTreeHost(GetProxy(&host_), | 660     factory->CreateWindowTreeHost(GetProxy(&host_), | 
| 660                                   std::move(tree_client_ptr)); | 661                                   std::move(tree_client_ptr)); | 
| 661 | 662 | 
| 662     // Next we should get an embed call on the "window manager" client. | 663     // Next we should get an embed call on the "window manager" client. | 
| 663     wt_client1_->WaitForOnEmbed(); | 664     wt_client1_->WaitForOnEmbed(); | 
| (...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2211 | 2212 | 
| 2212 // TODO(sky): make sure coverage of what was | 2213 // TODO(sky): make sure coverage of what was | 
| 2213 // WindowManagerTest.SecondEmbedRoot_InitService and | 2214 // WindowManagerTest.SecondEmbedRoot_InitService and | 
| 2214 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window | 2215 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window | 
| 2215 // manager | 2216 // manager | 
| 2216 // tests. | 2217 // tests. | 
| 2217 | 2218 | 
| 2218 }  // namespace test | 2219 }  // namespace test | 
| 2219 }  // namespace ws | 2220 }  // namespace ws | 
| 2220 }  // namespace ui | 2221 }  // namespace ui | 
| OLD | NEW | 
|---|