chromium/mojo/public/cpp/bindings/tests/service_factory_unittest.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "mojo/public/cpp/bindings/service_factory.h"

#include <optional>

#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/bindings/generic_pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/tests/service_factory_unittest.test-mojom.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace mojo {
namespace test {
namespace service_factory_unittest {

class ServiceFactoryTest : public testing::Test {};

class TestService1Impl : public mojom::TestService1 {};

class TestService2Impl : public mojom::TestService2 {};

int TestService1Impl::num_instances_ =;

auto RunTestService1(PendingReceiver<mojom::TestService1> receiver) {}

auto RunTestService2(PendingReceiver<mojom::TestService2> receiver) {}

TEST_F(ServiceFactoryTest, BasicMatching) {}

TEST_F(ServiceFactoryTest, DestroyInstanceOnClientDisconnect) {}

TEST_F(ServiceFactoryTest, DestroyInstanceOnServiceDisconnect) {}

TEST_F(ServiceFactoryTest, DestroyInstancesOnFactoryDestruction) {}

}  // namespace service_factory_unittest
}  // namespace test
}  // namespace mojo