chromium/content/browser/media/session/media_players_callback_aggregator_unittest.cc

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

#include "content/browser/media/session/media_players_callback_aggregator.h"

#include "base/not_fatal_until.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace content {

namespace {

// A simple `FakeMediaSession` class to simulate GetVisibility. This class takes
// as a constructor a vector of `desired_visibilities`, where the indices
// represent `player_id` s and the values the desired visibility to return to
// callers.
//
// This class also uses `PostTask` during `SimulateGetVisibility` to simulate
// asynchronous behavior.
class FakeMediaSession {};

class MediaPlayersCallbackAggregatorTest : public testing::Test {};

}  // anonymous namespace

TEST_F(MediaPlayersCallbackAggregatorTest, DoesNotCrashWithEmptyPlayers) {}

TEST_F(MediaPlayersCallbackAggregatorTest, MultiplePlayersAllMeetVisibility) {}

TEST_F(MediaPlayersCallbackAggregatorTest,
       MultiplePlayersAllDoNotMeetVisibility) {}

TEST_F(MediaPlayersCallbackAggregatorTest, MultiplePlayersSomeMeetVisibility) {}

TEST_F(MediaPlayersCallbackAggregatorTest,
       MultiplePlayersStopsAtFirstMeetVisibility) {}

}  // namespace content