chromium/chrome/browser/media/cast_remoting_connector_unittest.cc

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

#include "chrome/browser/media/cast_remoting_connector.h"

#include <memory>
#include <utility>
#include <vector>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "build/build_config.h"
#include "components/media_router/common/media_route.h"
#include "components/media_router/common/media_source.h"
#include "components/media_router/common/pref_names.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_task_environment.h"
#include "media/mojo/mojom/remoting.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

BrowserThread;

RemotingSinkMetadata;
RemotingSinkMetadataPtr;
RemotingStartFailReason;
RemotingStopReason;

_;
AtLeast;

namespace {

constexpr SessionID kRemotingTabId =;

RemotingSinkMetadataPtr GetDefaultSinkMetadata() {}

class MockRemotingSource final : public media::mojom::RemotingSource {};

class MockMediaRemoter final : public media::mojom::Remoter {};

}  // namespace

class CastRemotingConnectorTest : public ::testing::Test {};

TEST_F(CastRemotingConnectorTest, NeverNotifiesThatSinkIsAvailable) {}

TEST_F(CastRemotingConnectorTest, NotifiesWhenSinkIsAvailableAndThenGone) {}

TEST_F(CastRemotingConnectorTest,
       NotifiesMultipleSourcesWhenSinkIsAvailableAndThenGone) {}

TEST_F(CastRemotingConnectorTest, HandlesTeardownOfRemotingSourceFirst) {}

TEST_F(CastRemotingConnectorTest, HandlesTeardownOfRemoterFirst) {}

TEST_F(CastRemotingConnectorTest, NoConnectedMediaRemoter) {}

TEST_F(CastRemotingConnectorTest, UserDisableRemoting) {}

TEST_F(CastRemotingConnectorTest, NoPermissionToStart) {}

TEST_F(CastRemotingConnectorTest, PrefPersistsAcrossReset) {}

namespace {

// The possible ways a remoting session may be terminated in the "full
// run-through" tests.
enum HowItEnds {};

}  // namespace

class CastRemotingConnectorFullSessionTest
    : public CastRemotingConnectorTest,
      public ::testing::WithParamInterface<HowItEnds> {};

// Performs a full run-through of starting and stopping remoting, with
// communications between source and sink established at the correct times, and
// tests that end-to-end behavior is correct depending on what caused the
// remoting session to end.
TEST_P(CastRemotingConnectorFullSessionTest, GoesThroughAllTheMotions) {}

INSTANTIATE_TEST_SUITE_P();