| Index: mojo/shell/application_manager_unittest.cc
|
| diff --git a/mojo/shell/application_manager_unittest.cc b/mojo/shell/application_manager_unittest.cc
|
| index 8ce4303c7966e36767d43667ec996a5134e65be7..007756a432e0b8da0440781287ef12f37301f967 100644
|
| --- a/mojo/shell/application_manager_unittest.cc
|
| +++ b/mojo/shell/application_manager_unittest.cc
|
| @@ -20,7 +20,7 @@
|
| #include "mojo/shell/public/cpp/interface_factory.h"
|
| #include "mojo/shell/public/cpp/shell_client.h"
|
| #include "mojo/shell/public/cpp/shell_connection.h"
|
| -#include "mojo/shell/public/interfaces/service_provider.mojom.h"
|
| +#include "mojo/shell/public/interfaces/interface_provider.mojom.h"
|
| #include "mojo/shell/test.mojom.h"
|
| #include "mojo/shell/test_package_manager.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -402,7 +402,7 @@ class ApplicationManagerTest : public testing::Test {
|
| scoped_ptr<ApplicationLoader>(test_loader_));
|
|
|
| TestServicePtr service_proxy;
|
| - ConnectToService(application_manager_.get(), GURL(kTestURLString),
|
| + ConnectToInterface(application_manager_.get(), GURL(kTestURLString),
|
| &service_proxy);
|
| test_client_.reset(new TestClient(std::move(service_proxy)));
|
| }
|
| @@ -479,14 +479,14 @@ TEST_F(ApplicationManagerTest, SetLoaders) {
|
|
|
| // test::test1 should go to url_loader.
|
| TestServicePtr test_service;
|
| - ConnectToService(application_manager_.get(), GURL("test:test1"),
|
| - &test_service);
|
| + ConnectToInterface(application_manager_.get(), GURL("test:test1"),
|
| + &test_service);
|
| EXPECT_EQ(1, url_loader->num_loads());
|
| EXPECT_EQ(0, default_loader->num_loads());
|
|
|
| // http::test1 should go to default loader.
|
| - ConnectToService(application_manager_.get(), GURL("http:test1"),
|
| - &test_service);
|
| + ConnectToInterface(application_manager_.get(), GURL("http:test1"),
|
| + &test_service);
|
| EXPECT_EQ(1, url_loader->num_loads());
|
| EXPECT_EQ(1, default_loader->num_loads());
|
| }
|
| @@ -501,7 +501,7 @@ TEST_F(ApplicationManagerTest, ACallB) {
|
| AddLoaderForURL(GURL(kTestBURLString), kTestAURLString);
|
|
|
| TestAPtr a;
|
| - ConnectToService(application_manager_.get(), GURL(kTestAURLString), &a);
|
| + ConnectToInterface(application_manager_.get(), GURL(kTestAURLString), &a);
|
| a->CallB();
|
| loop_.Run();
|
| EXPECT_EQ(1, tester_context_.num_b_calls());
|
| @@ -517,7 +517,7 @@ TEST_F(ApplicationManagerTest, BCallC) {
|
| AddLoaderForURL(GURL(kTestBURLString), kTestAURLString);
|
|
|
| TestAPtr a;
|
| - ConnectToService(application_manager_.get(), GURL(kTestAURLString), &a);
|
| + ConnectToInterface(application_manager_.get(), GURL(kTestAURLString), &a);
|
| a->CallCFromB();
|
| loop_.Run();
|
|
|
| @@ -533,7 +533,7 @@ TEST_F(ApplicationManagerTest, BDeleted) {
|
| AddLoaderForURL(GURL(kTestBURLString), std::string());
|
|
|
| TestAPtr a;
|
| - ConnectToService(application_manager_.get(), GURL(kTestAURLString), &a);
|
| + ConnectToInterface(application_manager_.get(), GURL(kTestAURLString), &a);
|
|
|
| a->CallB();
|
| loop_.Run();
|
| @@ -556,7 +556,7 @@ TEST_F(ApplicationManagerTest, ANoLoadB) {
|
| AddLoaderForURL(GURL(kTestBURLString), "test:TestC");
|
|
|
| TestAPtr a;
|
| - ConnectToService(application_manager_.get(), GURL(kTestAURLString), &a);
|
| + ConnectToInterface(application_manager_.get(), GURL(kTestAURLString), &a);
|
| a->CallB();
|
| loop_.Run();
|
| EXPECT_EQ(0, tester_context_.num_b_calls());
|
| @@ -571,7 +571,7 @@ TEST_F(ApplicationManagerTest, NoServiceNoLoad) {
|
| // There is no TestC service implementation registered with
|
| // ApplicationManager, so this cannot succeed (but also shouldn't crash).
|
| TestCPtr c;
|
| - ConnectToService(application_manager_.get(), GURL(kTestAURLString), &c);
|
| + ConnectToInterface(application_manager_.get(), GURL(kTestAURLString), &c);
|
| c.set_connection_error_handler(
|
| []() { base::MessageLoop::current()->QuitWhenIdle(); });
|
|
|
| @@ -599,29 +599,29 @@ TEST_F(ApplicationManagerTest, SameIdentityShouldNotCauseDuplicateLoad) {
|
| EXPECT_EQ(1, test_loader_->num_loads());
|
|
|
| TestServicePtr test_service;
|
| - ConnectToService(application_manager_.get(),
|
| - GURL("http://www.example.org/abc?def"), &test_service);
|
| + ConnectToInterface(application_manager_.get(),
|
| + GURL("http://www.example.org/abc?def"), &test_service);
|
| EXPECT_EQ(2, test_loader_->num_loads());
|
|
|
| // Exactly the same URL as above.
|
| - ConnectToService(application_manager_.get(),
|
| - GURL("http://www.example.org/abc?def"), &test_service);
|
| + ConnectToInterface(application_manager_.get(),
|
| + GURL("http://www.example.org/abc?def"), &test_service);
|
| EXPECT_EQ(2, test_loader_->num_loads());
|
|
|
| // The same identity as the one above because only the query string is
|
| // different.
|
| - ConnectToService(application_manager_.get(),
|
| - GURL("http://www.example.org/abc"), &test_service);
|
| + ConnectToInterface(application_manager_.get(),
|
| + GURL("http://www.example.org/abc"), &test_service);
|
| EXPECT_EQ(2, test_loader_->num_loads());
|
|
|
| // A different identity because the path is different.
|
| - ConnectToService(application_manager_.get(),
|
| - GURL("http://www.example.org/another_path"), &test_service);
|
| + ConnectToInterface(application_manager_.get(),
|
| + GURL("http://www.example.org/another_path"), &test_service);
|
| EXPECT_EQ(3, test_loader_->num_loads());
|
|
|
| // A different identity because the domain is different.
|
| - ConnectToService(application_manager_.get(),
|
| - GURL("http://www.another_domain.org/abc"), &test_service);
|
| + ConnectToInterface(application_manager_.get(),
|
| + GURL("http://www.another_domain.org/abc"), &test_service);
|
| EXPECT_EQ(4, test_loader_->num_loads());
|
| }
|
|
|
|
|