#include <memory>
#include <vector>
#include "base/barrier_closure.h"
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ptr_util.h"
#include "base/no_destructor.h"
#include "base/process/process.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/service_manager/public/cpp/constants.h"
#include "services/service_manager/public/cpp/identity.h"
#include "services/service_manager/public/cpp/manifest.h"
#include "services/service_manager/public/cpp/manifest_builder.h"
#include "services/service_manager/public/cpp/service.h"
#include "services/service_manager/public/cpp/service_receiver.h"
#include "services/service_manager/public/cpp/test/test_service_manager.h"
#include "services/service_manager/public/mojom/constants.mojom.h"
#include "services/service_manager/public/mojom/service_manager.mojom.h"
#include "services/service_manager/tests/lifecycle/lifecycle.test-mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace service_manager {
namespace {
const char kTestName[] = …;
const char kTestAppName[] = …;
const char kTestParentName[] = …;
const char kTestPackageName[] = …;
const char kTestPackageAppNameA[] = …;
const char kTestPackageAppNameB[] = …;
const char kTestLifecycleControlCapability[] = …;
const char kTestParentCapability[] = …;
const std::vector<Manifest>& GetTestManifests() { … }
struct Instance { … };
class InstanceState : public mojom::ServiceManagerListener { … };
}
class LifecycleTest : public testing::Test { … };
TEST_F(LifecycleTest, Standalone_GracefulQuit) { … }
TEST_F(LifecycleTest, Standalone_Crash) { … }
TEST_F(LifecycleTest, Standalone_CloseServiceManagerConnection) { … }
TEST_F(LifecycleTest, PackagedApp_GracefulQuit) { … }
TEST_F(LifecycleTest, PackagedApp_Crash) { … }
TEST_F(LifecycleTest, PackagedApp_CrashCrashesOtherProvidedApp) { … }
TEST_F(LifecycleTest, PackagedApp_GracefulQuitPackageQuitsAll) { … }
}