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/ids.h" | 25 #include "mojo/services/view_manager/ids.h" |
26 #include "mojo/services/view_manager/test_change_tracker.h" | 26 #include "mojo/services/view_manager/test_change_tracker.h" |
27 #include "mojo/shell/shell_test_helper.h" | 27 #include "mojo/shell/shell_test_helper.h" |
28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
29 #include "ui/gfx/geometry/rect.h" | 29 #include "ui/gfx/geometry/rect.h" |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 EXPECT_EQ("[node=1,1 parent=null view=null]", | 466 EXPECT_EQ("[node=1,1 parent=null view=null]", |
467 ChangeNodeDescription(changes)); | 467 ChangeNodeDescription(changes)); |
468 } | 468 } |
469 } | 469 } |
470 | 470 |
471 void DestroySecondConnection() { | 471 void DestroySecondConnection() { |
472 connection2_->Destroy(); | 472 connection2_->Destroy(); |
473 connection2_ = NULL; | 473 connection2_ = NULL; |
474 } | 474 } |
475 | 475 |
| 476 base::ShadowingAtExitManager at_exit_; |
476 base::MessageLoop loop_; | 477 base::MessageLoop loop_; |
477 shell::ShellTestHelper test_helper_; | 478 shell::ShellTestHelper test_helper_; |
478 | 479 |
479 IViewManagerInitPtr view_manager_init_; | 480 IViewManagerInitPtr view_manager_init_; |
480 | 481 |
481 ViewManagerProxy* connection_; | 482 ViewManagerProxy* connection_; |
482 ViewManagerProxy* connection2_; | 483 ViewManagerProxy* connection2_; |
483 | 484 |
484 DISALLOW_COPY_AND_ASSIGN(ViewManagerConnectionTest); | 485 DISALLOW_COPY_AND_ASSIGN(ViewManagerConnectionTest); |
485 }; | 486 }; |
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 // TODO(sky): add coverage of test that destroys connections and ensures other | 1330 // TODO(sky): add coverage of test that destroys connections and ensures other |
1330 // connections get deletion notification (or advanced server id). | 1331 // connections get deletion notification (or advanced server id). |
1331 | 1332 |
1332 // TODO(sky): need to better track changes to initial connection. For example, | 1333 // TODO(sky): need to better track changes to initial connection. For example, |
1333 // that SetBounsdNodes/AddNode and the like don't result in messages to the | 1334 // that SetBounsdNodes/AddNode and the like don't result in messages to the |
1334 // originating connection. | 1335 // originating connection. |
1335 | 1336 |
1336 } // namespace service | 1337 } // namespace service |
1337 } // namespace view_manager | 1338 } // namespace view_manager |
1338 } // namespace mojo | 1339 } // namespace mojo |
OLD | NEW |