#include "chrome/browser/media/webrtc/display_media_access_handler.h"
#include "base/run_loop.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/media/webrtc/desktop_media_picker_manager.h"
#include "chrome/browser/media/webrtc/webrtc_browsertest_base.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "chromeos/crosapi/mojom/screen_manager.mojom.h"
#include "chromeos/lacros/lacros_service.h"
#endif
class DisplayMediaAccessHandlerTest
: public testing::WithParamInterface<bool>,
public WebRtcTestBase,
public DesktopMediaPickerManager::DialogObserver { … };
IN_PROC_BROWSER_TEST_F(DisplayMediaAccessHandlerTest, ShowPickerByDefault) { … }
IN_PROC_BROWSER_TEST_F(DisplayMediaAccessHandlerTest, RejectNoVideoByDefault) { … }
IN_PROC_BROWSER_TEST_F(DisplayMediaAccessHandlerTest, ForceSystemAudio) { … }
IN_PROC_BROWSER_TEST_F(DisplayMediaAccessHandlerTest,
ForceSystemAudioButExcluded) { … }
IN_PROC_BROWSER_TEST_F(DisplayMediaAccessHandlerTest,
ForceSystemAudioWithVideoStream) { … }