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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
| 8 #include "base/at_exit.h" |
8 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
9 #include "base/bind.h" | 10 #include "base/bind.h" |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
12 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
13 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
14 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
15 #include "mojo/common/common_type_converters.h" | 16 #include "mojo/common/common_type_converters.h" |
16 #include "mojo/public/cpp/application/application.h" | 17 #include "mojo/public/cpp/application/application.h" |
17 #include "mojo/public/cpp/application/connect.h" | 18 #include "mojo/public/cpp/application/connect.h" |
18 #include "mojo/public/cpp/bindings/lib/router.h" | 19 #include "mojo/public/cpp/bindings/lib/router.h" |
19 #include "mojo/public/cpp/environment/environment.h" | |
20 #include "mojo/service_manager/service_manager.h" | 20 #include "mojo/service_manager/service_manager.h" |
21 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" | 21 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" |
22 #include "mojo/services/public/cpp/view_manager/util.h" | 22 #include "mojo/services/public/cpp/view_manager/util.h" |
23 #include "mojo/services/public/cpp/view_manager/view_manager_types.h" | 23 #include "mojo/services/public/cpp/view_manager/view_manager_types.h" |
24 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" | 24 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" |
25 #include "mojo/services/view_manager/test_change_tracker.h" | 25 #include "mojo/services/view_manager/test_change_tracker.h" |
26 #include "mojo/shell/shell_test_helper.h" | 26 #include "mojo/shell/shell_test_helper.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 #include "ui/gfx/geometry/rect.h" | 28 #include "ui/gfx/geometry/rect.h" |
29 | 29 |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 EXPECT_EQ("[node=1,1 parent=null view=null]", | 446 EXPECT_EQ("[node=1,1 parent=null view=null]", |
447 ChangeNodeDescription(changes)); | 447 ChangeNodeDescription(changes)); |
448 } | 448 } |
449 } | 449 } |
450 | 450 |
451 void DestroySecondConnection() { | 451 void DestroySecondConnection() { |
452 connection2_->Destroy(); | 452 connection2_->Destroy(); |
453 connection2_ = NULL; | 453 connection2_ = NULL; |
454 } | 454 } |
455 | 455 |
| 456 base::ShadowingAtExitManager at_exit_; |
456 base::MessageLoop loop_; | 457 base::MessageLoop loop_; |
457 shell::ShellTestHelper test_helper_; | 458 shell::ShellTestHelper test_helper_; |
458 | 459 |
459 IViewManagerInitPtr view_manager_init_; | 460 IViewManagerInitPtr view_manager_init_; |
460 | 461 |
461 ViewManagerProxy* connection_; | 462 ViewManagerProxy* connection_; |
462 ViewManagerProxy* connection2_; | 463 ViewManagerProxy* connection2_; |
463 | 464 |
464 DISALLOW_COPY_AND_ASSIGN(ViewManagerConnectionTest); | 465 DISALLOW_COPY_AND_ASSIGN(ViewManagerConnectionTest); |
465 }; | 466 }; |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1226 // TODO(sky): add coverage of test that destroys connections and ensures other | 1227 // TODO(sky): add coverage of test that destroys connections and ensures other |
1227 // connections get deletion notification (or advanced server id). | 1228 // connections get deletion notification (or advanced server id). |
1228 | 1229 |
1229 // TODO(sky): need to better track changes to initial connection. For example, | 1230 // TODO(sky): need to better track changes to initial connection. For example, |
1230 // that SetBounsdNodes/AddNode and the like don't result in messages to the | 1231 // that SetBounsdNodes/AddNode and the like don't result in messages to the |
1231 // originating connection. | 1232 // originating connection. |
1232 | 1233 |
1233 } // namespace service | 1234 } // namespace service |
1234 } // namespace view_manager | 1235 } // namespace view_manager |
1235 } // namespace mojo | 1236 } // namespace mojo |
OLD | NEW |