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 "services/shell/public/cpp/shell_test.h" | 14 #include "services/shell/public/cpp/shell_test.h" |
15 #include "services/ui/public/cpp/tests/window_server_shelltest_base.h" | 15 #include "services/ui/public/cpp/tests/window_server_shelltest_base.h" |
16 #include "services/ui/public/interfaces/window_tree.mojom.h" | 16 #include "services/ui/public/interfaces/window_tree.mojom.h" |
17 #include "services/ui/public/interfaces/window_tree_host.mojom.h" | 17 #include "services/ui/public/interfaces/window_tree_host.mojom.h" |
18 #include "services/ui/ws/ids.h" | 18 #include "services/ui/ws/ids.h" |
19 #include "services/ui/ws/test_change_tracker.h" | 19 #include "services/ui/ws/test_change_tracker.h" |
20 | 20 |
21 using mojo::Array; | 21 using mojo::Array; |
22 using shell::Connection; | 22 using shell::Connection; |
23 using mojo::InterfaceRequest; | 23 using mojo::InterfaceRequest; |
24 using shell::ShellClient; | 24 using shell::Service; |
25 using mojo::String; | 25 using mojo::String; |
26 using ui::mojom::WindowDataPtr; | 26 using ui::mojom::WindowDataPtr; |
27 using ui::mojom::WindowTree; | 27 using ui::mojom::WindowTree; |
28 using ui::mojom::WindowTreeClient; | 28 using ui::mojom::WindowTreeClient; |
29 | 29 |
30 namespace ui { | 30 namespace ui { |
31 namespace ws { | 31 namespace ws { |
32 namespace test { | 32 namespace test { |
33 | 33 |
34 namespace { | 34 namespace { |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 client->WaitForOnEmbed(); | 569 client->WaitForOnEmbed(); |
570 | 570 |
571 EXPECT_EQ("OnEmbed", | 571 EXPECT_EQ("OnEmbed", |
572 SingleChangeToDescription(*client->tracker()->changes())); | 572 SingleChangeToDescription(*client->tracker()->changes())); |
573 if (client_id) | 573 if (client_id) |
574 *client_id = (*client->tracker()->changes())[0].client_id; | 574 *client_id = (*client->tracker()->changes())[0].client_id; |
575 return client; | 575 return client; |
576 } | 576 } |
577 | 577 |
578 // WindowServerShellTestBase: | 578 // WindowServerShellTestBase: |
579 bool AcceptConnection(shell::Connection* connection) override { | 579 bool OnConnect(shell::Connection* connection) override { |
580 connection->AddInterface(client_factory_.get()); | 580 connection->AddInterface(client_factory_.get()); |
581 return true; | 581 return true; |
582 } | 582 } |
583 | 583 |
584 void SetUp() override { | 584 void SetUp() override { |
585 client_factory_.reset(new WindowTreeClientFactory()); | 585 client_factory_.reset(new WindowTreeClientFactory()); |
586 | 586 |
587 WindowServerShellTestBase::SetUp(); | 587 WindowServerShellTestBase::SetUp(); |
588 | 588 |
589 mojom::WindowTreeHostFactoryPtr factory; | 589 mojom::WindowTreeHostFactoryPtr factory; |
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2033 | 2033 |
2034 // TODO(sky): make sure coverage of what was | 2034 // TODO(sky): make sure coverage of what was |
2035 // WindowManagerTest.SecondEmbedRoot_InitService and | 2035 // WindowManagerTest.SecondEmbedRoot_InitService and |
2036 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window | 2036 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window |
2037 // manager | 2037 // manager |
2038 // tests. | 2038 // tests. |
2039 | 2039 |
2040 } // namespace test | 2040 } // namespace test |
2041 } // namespace ws | 2041 } // namespace ws |
2042 } // namespace ui | 2042 } // namespace ui |
OLD | NEW |