#include "chrome/browser/media/router/providers/cast/cast_session_tracker.h"
#include "base/memory/raw_ptr.h"
#include "base/test/values_test_util.h"
#include "chrome/browser/media/router/test/provider_test_helpers.h"
#include "components/media_router/common/providers/cast/channel/cast_message_util.h"
#include "components/media_router/common/providers/cast/channel/cast_test_util.h"
#include "components/media_router/common/test/test_helper.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
IsJson;
ParseJsonDict;
kMediaNamespace;
kReceiverNamespace;
_;
ByRef;
Eq;
NiceMock;
namespace media_router {
namespace {
constexpr char kDestinationId[] = …;
constexpr char kSourceId[] = …;
constexpr char kReceiverStatus[] = …;
constexpr char kIdleReceiverStatus[] = …;
}
class MockCastSessionObserver : public CastSessionTracker::Observer { … };
class CastSessionTrackerTest : public testing::Test { … };
TEST_F(CastSessionTrackerTest, QueryReceiverOnSinkAdded) { … }
TEST_F(CastSessionTrackerTest, RemoveSessionOnSinkRemoved) { … }
TEST_F(CastSessionTrackerTest, RemoveSession) { … }
TEST_F(CastSessionTrackerTest, GetSessions) { … }
TEST_F(CastSessionTrackerTest, HandleMediaStatusMessageBasic) { … }
TEST_F(CastSessionTrackerTest, HandleMediaStatusMessageFancy) { … }
TEST_F(CastSessionTrackerTest, CopySavedMediaFieldsToMediaList) { … }
TEST_F(CastSessionTrackerTest, DoNotCopySavedMediaFieldsWhenFieldPresent) { … }
}