#include "chrome/browser/media/webrtc/current_tab_desktop_media_list.h"
#include <vector>
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/media/webrtc/desktop_media_list.h"
#include "chrome/browser/media/webrtc/tab_desktop_media_list_mock_observer.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/fake_profile_manager.h"
#include "chrome/test/base/scoped_testing_local_state.h"
#include "chrome/test/base/test_browser_window.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gmock/include/gmock/gmock.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ash/login/users/chrome_user_manager_impl.h"
#include "chrome/browser/ash/settings/scoped_cros_settings_test_helper.h"
#include "components/user_manager/scoped_user_manager.h"
#endif
WebContents;
WebContentsTester;
_;
StrictMock;
namespace {
const base::TimeDelta kUpdatePeriod = …;
}
ACTION_P(QuitMessageLoop, run_loop) { … }
class CurrentTabDesktopMediaListTest : public testing::Test { … };
TEST_F(CurrentTabDesktopMediaListTest, UpdateSourcesListCalledWithCurrentTab) { … }
TEST_F(CurrentTabDesktopMediaListTest,
UpdateSourcesListNotCalledIfSourceAdded) { … }
TEST_F(CurrentTabDesktopMediaListTest,
UpdateSourcesListNotCalledIfSourceRemoved) { … }
TEST_F(CurrentTabDesktopMediaListTest, OnSourceThumbnailCalledIfNewThumbnail) { … }
TEST_F(CurrentTabDesktopMediaListTest,
OnSourceThumbnailNotCalledIfIfOldThumbnail) { … }
TEST_F(CurrentTabDesktopMediaListTest, CallingRefreshAfterTabFreedIsSafe) { … }