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/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "mojo/public/cpp/application/application_connection.h" | 8 #include "mojo/public/cpp/application/application_connection.h" |
9 #include "mojo/public/cpp/application/application_delegate.h" | 9 #include "mojo/public/cpp/application/application_delegate.h" |
10 #include "mojo/public/cpp/application/application_impl.h" | 10 #include "mojo/public/cpp/application/application_impl.h" |
11 #include "mojo/public/cpp/application/interface_factory.h" | 11 #include "mojo/public/cpp/application/interface_factory.h" |
12 #include "mojo/public/interfaces/service_provider/service_provider.mojom.h" | 12 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
13 #include "mojo/service_manager/background_service_loader.h" | 13 #include "mojo/service_manager/background_service_loader.h" |
14 #include "mojo/service_manager/service_loader.h" | 14 #include "mojo/service_manager/service_loader.h" |
15 #include "mojo/service_manager/service_manager.h" | 15 #include "mojo/service_manager/service_manager.h" |
16 #include "mojo/service_manager/test.mojom.h" | 16 #include "mojo/service_manager/test.mojom.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace mojo { | 19 namespace mojo { |
20 namespace { | 20 namespace { |
21 | 21 |
22 const char kTestURLString[] = "test:testService"; | 22 const char kTestURLString[] = "test:testService"; |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 std::string url("test:test3"); | 625 std::string url("test:test3"); |
626 TestServicePtr test_service; | 626 TestServicePtr test_service; |
627 service_manager_->ConnectToService(GURL(url), &test_service); | 627 service_manager_->ConnectToService(GURL(url), &test_service); |
628 | 628 |
629 EXPECT_EQ(1, interceptor.call_count()); | 629 EXPECT_EQ(1, interceptor.call_count()); |
630 EXPECT_EQ(url, interceptor.url_spec()); | 630 EXPECT_EQ(url, interceptor.url_spec()); |
631 EXPECT_EQ(1, default_loader->num_loads()); | 631 EXPECT_EQ(1, default_loader->num_loads()); |
632 } | 632 } |
633 | 633 |
634 } // namespace mojo | 634 } // namespace mojo |
OLD | NEW |