Chromium Code Reviews| Index: mojo/application_manager/application_manager_unittest.cc |
| diff --git a/mojo/application_manager/application_manager_unittest.cc b/mojo/application_manager/application_manager_unittest.cc |
| index c276f2e4d0b8911b73138bae6ddab919182ba6e9..5c640a1938489f9c3d615a0f68499ba718249a3b 100644 |
| --- a/mojo/application_manager/application_manager_unittest.cc |
| +++ b/mojo/application_manager/application_manager_unittest.cc |
| @@ -8,7 +8,6 @@ |
| #include "base/message_loop/message_loop.h" |
| #include "mojo/application_manager/application_loader.h" |
| #include "mojo/application_manager/application_manager.h" |
| -#include "mojo/application_manager/background_shell_application_loader.h" |
| #include "mojo/application_manager/test.mojom.h" |
| #include "mojo/public/cpp/application/application_connection.h" |
| #include "mojo/public/cpp/application/application_delegate.h" |
| @@ -84,7 +83,7 @@ class TestClientImpl : public TestClient { |
| base::MessageLoop::current()->Quit(); |
| } |
| - void Test(std::string test_string) { |
| + void Test(const std::string& test_string) { |
| quit_after_ack_ = true; |
| service_->Test(test_string); |
| } |
| @@ -450,19 +449,9 @@ class ApplicationManagerTest : public testing::Test { |
| application_manager_.reset(NULL); |
| } |
| - scoped_ptr<BackgroundShellApplicationLoader> MakeLoader( |
| - const std::string& requestor_url) { |
| - scoped_ptr<ApplicationLoader> real_loader( |
| - new Tester(&tester_context_, requestor_url)); |
| - scoped_ptr<BackgroundShellApplicationLoader> loader( |
| - new BackgroundShellApplicationLoader(real_loader.Pass(), |
| - std::string(), |
| - base::MessageLoop::TYPE_DEFAULT)); |
| - return loader.Pass(); |
| - } |
| - |
| void AddLoaderForURL(const GURL& url, const std::string& requestor_url) { |
| - application_manager_->SetLoaderForURL(MakeLoader(requestor_url), url); |
| + application_manager_->SetLoaderForURL( |
| + make_scoped_ptr(new Tester(&tester_context_, requestor_url)), url); |
| } |
| bool HasFactoryForTestURL() { |
| @@ -630,26 +619,6 @@ TEST_F(ApplicationManagerTest, BCallC) { |
| EXPECT_TRUE(tester_context_.a_called_quit()); |
| } |
| -// Confirm that a service impl will be deleted if the app that connected to |
| -// it goes away. |
| -TEST_F(ApplicationManagerTest, BDeleted) { |
|
sky
2014/12/16 19:22:19
Contrary to the description this test was exercisi
qsr
2014/12/17 10:34:34
Can you still make this work by having Tester use
|
| - AddLoaderForURL(GURL(kTestAURLString), std::string()); |
| - AddLoaderForURL(GURL(kTestBURLString), std::string()); |
| - |
| - TestAPtr a; |
| - application_manager_->ConnectToService(GURL(kTestAURLString), &a); |
| - |
| - a->CallB(); |
| - loop_.Run(); |
| - |
| - // Kills the a app. |
| - application_manager_->SetLoaderForURL(scoped_ptr<ApplicationLoader>(), |
| - GURL(kTestAURLString)); |
| - loop_.Run(); |
| - |
| - EXPECT_EQ(1, tester_context_.num_b_deletes()); |
| -} |
| - |
| // Confirm that the url of a service is correctly passed to another service that |
| // it loads, and that it can be rejected. |
| TEST_F(ApplicationManagerTest, ANoLoadB) { |