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

Side by Side Diff: services/ui/ws/window_tree_client_unittest.cc

Issue 2503063003: Add service name constant for UI service. (Closed)
Patch Set: . Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « services/ui/public/interfaces/constants.mojom ('k') | ui/aura/mus/gpu_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « services/ui/public/interfaces/constants.mojom ('k') | ui/aura/mus/gpu_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698