chromium/chrome/browser/media/router/providers/cast/cast_internal_message_util_unittest.cc

// Copyright 2018 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/router/providers/cast/cast_internal_message_util.h"

#include "base/json/json_reader.h"
#include "base/test/gtest_util.h"
#include "build/build_config.h"
#include "chrome/browser/media/router/test/provider_test_helpers.h"
#include "components/media_router/common/providers/cast/channel/cast_test_util.h"
#include "components/media_router/common/test/test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"

IsJson;
ParseJson;
ParseJsonDict;

namespace media_router {

namespace {

static constexpr char kReceiverIdToken[] =;

base::Value::Dict ReceiverStatus() {}

// appId: native app ID
// universalAppId: web receiver app ID, which is appId in ReceiverStatus without
// universalAppId or appType
base::Value::Dict ReceiverStatusWithUniversalAppId() {}

void ExpectNoCastSession(const MediaSinkInternal& sink,
                         const std::string& receiver_status_str,
                         const std::string& reason) {}

void ExpectInvalidCastInternalMessage(const std::string& message_str,
                                      const std::string& invalid_reason) {}

class CastInternalMessageUtilDeathTest : public testing::Test {};

}  // namespace

// TODO(crbug.com/1377730): This test sometimes times out on the Win bot.
#if BUILDFLAG(IS_WIN)
#define MAYBE_CastInternalMessageFromAppMessageString
#else
#define MAYBE_CastInternalMessageFromAppMessageString
#endif
TEST_F(CastInternalMessageUtilDeathTest,
       MAYBE_CastInternalMessageFromAppMessageString) {}

TEST_F(CastInternalMessageUtilDeathTest,
       CastInternalMessageFromV2MessageString) {}

// TODO(crbug.com/1378312): This test sometimes times out on the Win debug bot.
#if BUILDFLAG(IS_WIN) && !defined(NDEBUG) || BUILDFLAG(IS_LINUX)
#define MAYBE_CastInternalMessageFromClientConnectString
#else
#define MAYBE_CastInternalMessageFromClientConnectString
#endif
TEST_F(CastInternalMessageUtilDeathTest,
       MAYBE_CastInternalMessageFromClientConnectString) {}

TEST(CastInternalMessageUtilTest, CastInternalMessageFromInvalidStrings) {}

TEST(CastInternalMessageUtilTest, CastSessionFromReceiverStatusNoStatusText) {}

TEST(CastInternalMessageUtilTest, CastSessionFromInvalidReceiverStatuses) {}

TEST(CastInternalMessageUtilTest, CreateReceiverActionCastMessage) {}

TEST(CastInternalMessageUtilTest, CreateReceiverActionStopMessage) {}

TEST(CastInternalMessageUtilTest, CreateNewSessionMessage) {}

TEST(CastInternalMessageUtilTest, CreateNewSessionMessageWithUniversalAppId) {}

TEST(CastInternalMessageUtilTest, CreateUpdateSessionMessage) {}

TEST(CastInternalMessageUtilTest, CreateAppMessageAck) {}

TEST(CastInternalMessageUtilTest, CreateAppMessage) {}

TEST(CastInternalMessageUtilTest, CreateV2Message) {}

TEST(CastInternalMessageUtilTest, SupportedMediaCommandsToListValue) {}

}  // namespace media_router