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

Side by Side Diff: services/service_manager/tests/lifecycle/lifecycle_unittest.cc

Issue 2476063002: Service Manager: Rework Service and ServiceContext lifetime (Closed)
Patch Set: . Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <memory> 5 #include <memory>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/process/process.h" 11 #include "base/process/process.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "mojo/public/cpp/bindings/binding.h"
13 #include "services/service_manager/public/cpp/identity.h" 14 #include "services/service_manager/public/cpp/identity.h"
14 #include "services/service_manager/public/cpp/service_test.h" 15 #include "services/service_manager/public/cpp/service_test.h"
15 #include "services/service_manager/public/interfaces/service_manager.mojom.h" 16 #include "services/service_manager/public/interfaces/service_manager.mojom.h"
16 #include "services/service_manager/tests/lifecycle/lifecycle_unittest.mojom.h" 17 #include "services/service_manager/tests/lifecycle/lifecycle_unittest.mojom.h"
17 #include "services/service_manager/tests/util.h" 18 #include "services/service_manager/tests/util.h"
18 19
19 namespace service_manager { 20 namespace service_manager {
20 21
21 namespace { 22 namespace {
22 23
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 parent->Quit(); 448 parent->Quit();
448 449
449 // Quitting the parent should cascade-quit the child. 450 // Quitting the parent should cascade-quit the child.
450 WaitForInstanceDestruction(); 451 WaitForInstanceDestruction();
451 EXPECT_EQ(0u, instances()->GetNewInstanceCount()); 452 EXPECT_EQ(0u, instances()->GetNewInstanceCount());
452 EXPECT_FALSE(instances()->HasInstanceForName(kTestParentName)); 453 EXPECT_FALSE(instances()->HasInstanceForName(kTestParentName));
453 EXPECT_FALSE(instances()->HasInstanceForName(kTestAppName)); 454 EXPECT_FALSE(instances()->HasInstanceForName(kTestAppName));
454 } 455 }
455 456
456 } // namespace service_manager 457 } // namespace service_manager
OLDNEW
« no previous file with comments | « services/service_manager/tests/lifecycle/lifecycle_exe.cc ('k') | services/service_manager/tests/lifecycle/package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698