#include "remoting/host/chromoting_host_services_client.h"
#include <memory>
#include <vector>
#include "base/environment.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.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/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "mojo/public/cpp/system/isolated_connection.h"
#include "remoting/host/mojo_caller_security_checker.h"
#include "remoting/host/mojom/chromoting_host_services.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace remoting {
class ChromotingHostServicesClientTest : public testing::Test,
public mojom::ChromotingHostServices { … };
ChromotingHostServicesClientTest::ChromotingHostServicesClientTest() { … }
ChromotingHostServicesClientTest::~ChromotingHostServicesClientTest() = default;
void ChromotingHostServicesClientTest::BindSessionServices(
mojo::PendingReceiver<mojom::ChromotingSessionServices> receiver) { … }
void ChromotingHostServicesClientTest::TearDown() { … }
void ChromotingHostServicesClientTest::SetChromeRemoteDesktopSessionEnvVar(
bool is_crd_session) { … }
void ChromotingHostServicesClientTest::WaitForSessionServicesBound() { … }
void ChromotingHostServicesClientTest::SetRemoteDisconnectCallback(
base::OnceClosure callback) { … }
mojo::PendingRemote<mojom::ChromotingHostServices>
ChromotingHostServicesClientTest::ConnectToServer() { … }
TEST_F(ChromotingHostServicesClientTest,
ServerNotRunning_GetSessionServicesReturnsNull) { … }
#if BUILDFLAG(IS_LINUX)
TEST_F(ChromotingHostServicesClientTest,
NotInRemoteDesktopSession_GetSessionServicesReturnsNull) { … }
#endif
TEST_F(ChromotingHostServicesClientTest,
CallGetSessionServicesTwice_SamePointerReturned) { … }
TEST_F(ChromotingHostServicesClientTest,
ServerClosesReceiverAndClientReconnects) { … }
}