Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: services/service_manager/tests/lifecycle/lifecycle_unittest.cc

Issue 2572803002: [ServiceManager] Eliminate parent-child relationship between services (Closed)
Patch Set: More general fix for ConnectTest shutdown deadlock Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/service_manager/service_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/service_manager/tests/lifecycle/lifecycle_unittest.cc
diff --git a/services/service_manager/tests/lifecycle/lifecycle_unittest.cc b/services/service_manager/tests/lifecycle/lifecycle_unittest.cc
index 1e6edcf94aa6133965c469d4ecd095e35039c687..0bcbed68a8e47f6cc18e284fb716e66ba8117593 100644
--- a/services/service_manager/tests/lifecycle/lifecycle_unittest.cc
+++ b/services/service_manager/tests/lifecycle/lifecycle_unittest.cc
@@ -23,7 +23,6 @@ namespace service_manager {
namespace {
const char kTestAppName[] = "lifecycle_unittest_app";
-const char kTestParentName[] = "lifecycle_unittest_parent";
const char kTestExeName[] = "lifecycle_unittest_exe";
const char kTestPackageName[] = "lifecycle_unittest_package";
const char kTestPackageAppNameA[] = "lifecycle_unittest_package_app_a";
@@ -426,33 +425,4 @@ TEST_F(LifecycleTest, Exe_TerminateProcess) {
EXPECT_EQ(0u, instances()->GetNewInstanceCount());
}
-TEST_F(LifecycleTest, ShutdownTree) {
- // Verifies that Instances are destroyed when their creator is.
- std::unique_ptr<Connection> parent_connection =
- connector()->Connect(kTestParentName);
- test::mojom::ParentPtr parent;
- parent_connection->GetInterface(&parent);
-
- // This asks kTestParentName to open a connection to kTestAppName and blocks
- // on a response from a Ping().
- {
- base::RunLoop loop;
- parent->ConnectToChild(base::Bind(&QuitLoop, &loop));
- loop.Run();
- }
-
- // Should now have two new instances (parent and child).
- EXPECT_EQ(2u, instances()->GetNewInstanceCount());
- EXPECT_TRUE(instances()->HasInstanceForName(kTestParentName));
- EXPECT_TRUE(instances()->HasInstanceForName(kTestAppName));
-
- parent->Quit();
-
- // Quitting the parent should cascade-quit the child.
- WaitForInstanceDestruction();
- EXPECT_EQ(0u, instances()->GetNewInstanceCount());
- EXPECT_FALSE(instances()->HasInstanceForName(kTestParentName));
- EXPECT_FALSE(instances()->HasInstanceForName(kTestAppName));
-}
-
} // namespace service_manager
« no previous file with comments | « services/service_manager/service_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698