#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/run_loop.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/media/webrtc/webrtc_browsertest_base.h"
#include "chrome/browser/media/webrtc/webrtc_browsertest_common.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/test_switches.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "media/base/media_switches.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "services/network/public/cpp/is_potentially_trustworthy.h"
#include "third_party/blink/public/common/mediastream/media_stream_request.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom-shared.h"
class MediaStreamPermissionTest : public WebRtcTestBase { … };
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest, TestAllowingUserMedia) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest, TestDenyingUserMedia) { … }
#if defined(THREAD_SANITIZER)
#define MAYBE_TestDismissingRequest …
#else
#define MAYBE_TestDismissingRequest …
#endif
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest, MAYBE_TestDismissingRequest) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest,
TestDenyingUserMediaIncognito) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest,
TestSecureOriginDenyIsSticky) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest,
TestSecureOriginAcceptIsSticky) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest, TestDismissIsNotSticky) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest,
TestDenyingThenClearingStickyException) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest,
DenyingMicDoesNotCauseStickyDenyForCameras) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest,
DenyingCameraDoesNotCauseStickyDenyForMics) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest,
DenyingCameraPermissionStopsAVStream) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest,
DenyingMicPermissionStopsAVStream) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest,
DenyingCameraPermissionStopsVideoOnlyStream) { … }
IN_PROC_BROWSER_TEST_F(MediaStreamPermissionTest,
DenyingMicPermissionDoesntStopVideoOnlyStream) { … }