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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "mojo/application_manager/application_loader.h" | |
11 #include "mojo/application_manager/application_manager.h" | |
12 #include "mojo/application_manager/test.mojom.h" | |
13 #include "mojo/public/cpp/application/application_connection.h" | 10 #include "mojo/public/cpp/application/application_connection.h" |
14 #include "mojo/public/cpp/application/application_delegate.h" | 11 #include "mojo/public/cpp/application/application_delegate.h" |
15 #include "mojo/public/cpp/application/application_impl.h" | 12 #include "mojo/public/cpp/application/application_impl.h" |
16 #include "mojo/public/cpp/application/interface_factory.h" | 13 #include "mojo/public/cpp/application/interface_factory.h" |
17 #include "mojo/public/interfaces/application/service_provider.mojom.h" | 14 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
| 15 #include "shell/application_manager/application_loader.h" |
| 16 #include "shell/application_manager/application_manager.h" |
| 17 #include "shell/application_manager/test.mojom.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 namespace mojo { | 20 namespace mojo { |
21 namespace { | 21 namespace { |
22 | 22 |
23 const char kTestURLString[] = "test:testService"; | 23 const char kTestURLString[] = "test:testService"; |
24 const char kTestAURLString[] = "test:TestA"; | 24 const char kTestAURLString[] = "test:TestA"; |
25 const char kTestBURLString[] = "test:TestB"; | 25 const char kTestBURLString[] = "test:TestB"; |
26 | 26 |
27 struct TestContext { | 27 struct TestContext { |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 TestServicePtr test_service2; | 664 TestServicePtr test_service2; |
665 application_manager_->ConnectToService(GURL("foo:foo2"), &test_service2); | 665 application_manager_->ConnectToService(GURL("foo:foo2"), &test_service2); |
666 EXPECT_EQ(2, test_loader_->num_loads()); | 666 EXPECT_EQ(2, test_loader_->num_loads()); |
667 | 667 |
668 TestServicePtr test_service3; | 668 TestServicePtr test_service3; |
669 application_manager_->ConnectToService(GURL("bar:bar"), &test_service2); | 669 application_manager_->ConnectToService(GURL("bar:bar"), &test_service2); |
670 EXPECT_EQ(3, test_loader_->num_loads()); | 670 EXPECT_EQ(3, test_loader_->num_loads()); |
671 } | 671 } |
672 | 672 |
673 } // namespace mojo | 673 } // namespace mojo |
OLD | NEW |