chromium/components/global_media_controls/public/media_session_item_producer_unittest.cc

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

#include "components/global_media_controls/public/media_session_item_producer.h"

#include <memory>
#include <utility>

#include "base/containers/contains.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/unguessable_token.h"
#include "components/global_media_controls/public/media_session_notification_item.h"
#include "components/global_media_controls/public/test/mock_media_item_manager.h"
#include "components/media_message_center/media_notification_item.h"
#include "components/media_message_center/media_notification_util.h"
#include "media/base/media_switches.h"
#include "services/media_session/public/cpp/test/mock_audio_focus_manager.h"
#include "services/media_session/public/cpp/test/mock_media_controller_manager.h"
#include "services/media_session/public/cpp/test/test_media_controller.h"
#include "services/media_session/public/mojom/audio_focus.mojom.h"
#include "services/media_session/public/mojom/media_session.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

AudioFocusRequestState;
AudioFocusRequestStatePtr;
MediaSessionAction;
MediaSessionInfo;
MediaSessionInfoPtr;
_;
AtLeast;
Expectation;
NiceMock;
Return;

namespace global_media_controls {

class MediaSessionItemProducerTest : public testing::Test {};

TEST_F(MediaSessionItemProducerTest, ShowControllableOnGainAndHideOnLoss) {}

TEST_F(MediaSessionItemProducerTest, DoesNotShowUncontrollableSession) {}

TEST_F(MediaSessionItemProducerTest,
       DoesNotShowControllableSessionThatBecomesUncontrollable) {}

TEST_F(MediaSessionItemProducerTest, HideAfterTimeoutAndActiveAgainOnPlay) {}

TEST_F(MediaSessionItemProducerTest,
       BecomesActiveIfMediaStartsPlayingWithinTimeout) {}

TEST_F(MediaSessionItemProducerTest,
       SessionIsRemovedImmediatelyWhenATabCloses) {}

TEST_F(MediaSessionItemProducerTest, DismissesMediaSession) {}

// Regression test for https://crbug.com/1015903: we could end up in a
// situation where the toolbar icon was disabled indefinitely.
TEST_F(MediaSessionItemProducerTest, LoseGainLoseDoesNotCauseRaceCondition) {}

TEST_F(MediaSessionItemProducerTest, HidesInactiveNotifications) {}

TEST_F(MediaSessionItemProducerTest, InactiveBecomesActive_PlayPause) {}

TEST_F(MediaSessionItemProducerTest, InactiveBecomesActive_Seeking) {}

TEST_F(MediaSessionItemProducerTest, DelaysHidingNotifications_PlayPause) {}

TEST_F(MediaSessionItemProducerTest, DelaysHidingNotifications_Interactions) {}

TEST_F(MediaSessionItemProducerTest, HidingNotification_FeatureDisabled) {}

TEST_F(MediaSessionItemProducerTest, HidingNotification_TimerParams) {}

TEST_F(MediaSessionItemProducerTest, RefreshSessionWhenRemotePlaybackChanges) {}

TEST_F(MediaSessionItemProducerTest, ClicksNotificationItem) {}

}  // namespace global_media_controls